OPEN-SOURCE SCRIPT
ddddddrrrrrr

//version=5
indicator("🚀 EventSniper HF v3.0 - 高频方向信号", overlay=true)
// 参数
emaFast = input.int(5, "快速EMA")
emaSlow = input.int(20, "慢速EMA")
rsiLen = input.int(7, "RSI周期")
volRatio = input.float(1.8, "量能放大倍数")
// 指标计算
ema1 = ta.ema(close, emaFast)
ema2 = ta.ema(close, emaSlow)
rsi = ta.rsi(close, rsiLen)
volAvg = ta.sma(volume, 20)
volSpike = volume > volAvg * volRatio
// 高频方向信号(核心逻辑)
longCond = ema1 > ema2 and rsi > 50 and volSpike
shortCond = ema1 < ema2 and rsi < 50 and volSpike
// 信号绘图
plotshape(longCond, title="建议做多", location=location.belowbar, color=color.lime, style=shape.labelup, text="多")
plotshape(shortCond, title="建议做空", location=location.abovebar, color=color.red, style=shape.labeldown, text="空")
// 文本提示
label.new(longCond ? bar_index : na, low,
"📈 建议多头方向", style=label.style_label_up,
color=color.green, textcolor=color.white)
label.new(shortCond ? bar_index : na, high,
"📉 建议空头方向", style=label.style_label_down,
color=color.red, textcolor=color.white)
// 报警条件(用于接入Telegram)
alertcondition(longCond, title="📈 多方向警报", message="🚀 多方向信号触发:{{ticker}}")
alertcondition(shortCond, title="📉 空方向警报", message="🚨 空方向信号触发:{{ticker}}")
indicator("🚀 EventSniper HF v3.0 - 高频方向信号", overlay=true)
// 参数
emaFast = input.int(5, "快速EMA")
emaSlow = input.int(20, "慢速EMA")
rsiLen = input.int(7, "RSI周期")
volRatio = input.float(1.8, "量能放大倍数")
// 指标计算
ema1 = ta.ema(close, emaFast)
ema2 = ta.ema(close, emaSlow)
rsi = ta.rsi(close, rsiLen)
volAvg = ta.sma(volume, 20)
volSpike = volume > volAvg * volRatio
// 高频方向信号(核心逻辑)
longCond = ema1 > ema2 and rsi > 50 and volSpike
shortCond = ema1 < ema2 and rsi < 50 and volSpike
// 信号绘图
plotshape(longCond, title="建议做多", location=location.belowbar, color=color.lime, style=shape.labelup, text="多")
plotshape(shortCond, title="建议做空", location=location.abovebar, color=color.red, style=shape.labeldown, text="空")
// 文本提示
label.new(longCond ? bar_index : na, low,
"📈 建议多头方向", style=label.style_label_up,
color=color.green, textcolor=color.white)
label.new(shortCond ? bar_index : na, high,
"📉 建议空头方向", style=label.style_label_down,
color=color.red, textcolor=color.white)
// 报警条件(用于接入Telegram)
alertcondition(longCond, title="📈 多方向警报", message="🚀 多方向信号触发:{{ticker}}")
alertcondition(shortCond, title="📉 空方向警报", message="🚨 空方向信号触发:{{ticker}}")
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。