该策略名为”EMA-RSI-Supertrend多因子收敛策略”,结合了指数移动平均线(EMA)、相对强弱指数(RSI)、超级趋势指标(Supertrend)和成交量确认信号,构建了一个多因子交易系统。策略通过8周期和21周期EMA的金叉/死叉作为基础信号,辅以RSI的中轴过滤和Supertrend的趋势确认,最后通过成交量放大来验证信号的可靠性。策略采用全仓进出模式,设置了基于EMA的退出条件,实现了完整的交易闭环。
该策略通过多因子协同作用实现了高质量的趋势交易信号,特别适合趋势明显的行情阶段。四重验证机制有效提升了信号可靠性,但需注意在震荡市中的适应性调整。未来可通过参数动态化和高级退出策略进一步提升绩效稳定性。整体而言,这是一个结构严谨、逻辑清晰的趋势跟踪系统,具有较高的实盘应用价值。
/*backtest
start: 2024-04-24 00:00:00
end: 2025-04-23 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"TRX_USD"}]
*/
//@version=5
//@WunderTrading
strategy("Nirvana Mode v1.0", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100, calc_on_every_tick=true)
// === INPUTS ===
emaShort = ta.ema(close, 8)
emaLong = ta.ema(close, 21)
rsi = ta.rsi(close, 14)
supertrendFactor = 3.0
supertrendPeriod = 10
[supertrend, direction] = ta.supertrend(supertrendFactor, supertrendPeriod)
volumeAvg = ta.sma(volume, 10)
volumeSpike = volume > volumeAvg * 1.8
// === ENTRY CONDITIONS ===
longCond = ta.crossover(emaShort, emaLong) and rsi > 50 and direction == 1 and volumeSpike
shortCond = ta.crossunder(emaShort, emaLong) and rsi < 50 and direction == -1 and volumeSpike
exitCond = ta.cross(close, emaLong)
// === PLOT & SIGNALS ===
plot(emaShort, color=color.orange)
plot(emaLong, color=color.blue)
plotshape(longCond, title="BUY", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small)
plotshape(shortCond, title="SELL", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small)
plotshape(exitCond, title="EXIT", location=location.bottom, color=color.gray, style=shape.xcross, size=size.tiny)
// === STRATEGY ORDERS ===
if (longCond)
strategy.entry("ENTER LONG", strategy.long, comment="ENTER-LONG_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
if (shortCond)
strategy.entry("ENTER SHORT", strategy.short, comment="ENTER-SHORT_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
if (exitCond)
strategy.close_all(comment="EXIT-ALL_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
// === ALERT ===
alertcondition(longCond, title="Long Signal", message="ENTER-LONG_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
alertcondition(shortCond, title="Short Signal", message="ENTER-SHORT_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")
alertcondition(exitCond, title="Exit Signal", message="EXIT-ALL_BITGET_BTCUSDT_NirvanaMode-v1.0_15M_hmq9xx")