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. קרא עוד ב־תנאי השימוש.