
Multiple Moving Average Trend Tracking Quantitative Trading Strategy adalah metode perdagangan kuantitatif kompleks yang menggabungkan Indeks Moving Average (EMA), Indeks Relatif Lemah (RSI) dan Indeks Moving Average Convergence Spread (MACD). Strategi ini bertujuan untuk meningkatkan akurasi dan keandalan sinyal perdagangan dengan mengintegrasikan beberapa indikator teknis, terutama untuk perdagangan garis pendek dan menengah di pasar yang sangat volatil.
Prinsip inti dari strategi ini adalah verifikasi gabungan dari beberapa indikator:
Peraturan untuk menghasilkan sinyal perdagangan:
Multiple Dynamic Indicator Trend Tracking Quantitative Trading Strategy dengan mengintegrasikan tiga indikator teknis utama EMA, RSI, dan MACD, membangun sistem sinyal perdagangan yang relatif robust. Strategi ini memiliki fleksibilitas yang cukup dan memiliki kemampuan kontrol risiko yang kuat, memberikan program perdagangan yang layak untuk dipelajari secara mendalam oleh pedagang kuantitatif.
/*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)