
La stratégie de trading quantitatif de suivi des tendances de l’indice de multiples dynamiques est une méthode de trading quantitatif de type composite combinant des moyennes mobiles d’indices (EMA), des indices de force relative (RSI) et des moyennes mobiles convergentes (MACD). La stratégie vise à améliorer l’exactitude et la fiabilité des signaux de trading en intégrant plusieurs indicateurs techniques. Elle est particulièrement adaptée aux transactions de courte et moyenne durée sur des marchés très volatils.
Le principe central de cette stratégie est la vérification combinée de plusieurs indicateurs:
Règles de génération de signaux spécifiques:
La stratégie de trading quantitatif, qui suit les tendances de plusieurs indicateurs dynamiques, a construit un système de génération de signaux de négociation relativement robuste en intégrant les trois indicateurs techniques clés EMA, RSI et MACD. La stratégie a conservé suffisamment de flexibilité et possède une forte capacité de contrôle du risque, offrant aux traders quantitatifs un programme de négociation digne d’une étude approfondie.
/*backtest
start: 2025-01-01 00:00:00
end: 2025-04-01 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"DOGE_USDT"}]
*/
//@version=6
strategy("EMA + RSI + MACD Strategy", overlay=true)
// Input for EMA Lengths
emaFastLength = input(9, title="Fast EMA Length")
emaSlowLength = input(21, title="Slow EMA Length")
// RSI Settings
rsiLength = input(14, title="RSI Length")
rsiOverbought = input(70, title="RSI Overbought Level")
rsiOversold = input(30, title="RSI Oversold Level")
// MACD Settings
[macdLine, signalLine, _] = ta.macd(close, 12, 26, 9)
// Calculate EMAs
emaFast = ta.ema(close, emaFastLength)
emaSlow = ta.ema(close, emaSlowLength)
// Calculate RSI
rsi = ta.rsi(close, rsiLength)
// Plot EMAs
plot(emaFast, title="Fast EMA", color=color.blue, linewidth=1)
plot(emaSlow, title="Slow EMA", color=color.red, linewidth=1)
// Buy and Sell Conditions
bullishCrossover = ta.crossover(emaFast, emaSlow) and rsi > 50 and macdLine > signalLine
bearishCrossover = ta.crossunder(emaFast, emaSlow) and rsi < 50 and macdLine < signalLine
// Plot Buy and Sell Signals
plotshape(series=bullishCrossover, title="BuySignal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, text="BUY")
plotshape(series=bearishCrossover, title="SellSignal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, text="SELL")
// Strategy Execution
if bullishCrossover
strategy.entry("Buy", strategy.long)
if bearishCrossover
strategy.close("Buy")
strategy.entry("Sell", strategy.short)