OPEN-SOURCE SCRIPT

ddddddrrrrrr

78
//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}}")

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.