
다중동량 지수 트렌드 추적량화 거래 전략은 지수 이동 평균 (EMA), 상대적으로 강한 지수 (RSI) 및 이동 평균 수렴 분산 지수 (MACD) 를 결합한 복합형량화 거래 방법이다. 이 전략은 여러 기술 지표를 통합하여 거래 신호의 정확성과 신뢰성을 향상시키기 위해 고조동성 시장의 짧은 선과 중간에 특히 적합하다.
이 전략의 핵심 원칙은 여러 지표의 합동 검증입니다:
특정 거래 신호 생성 규칙:
다중 역량 지표 트렌드를 추적하는 양자 거래 전략은 EMA, RSI, MACD의 세 가지 핵심 기술 지표를 통합하여 비교적 튼튼한 거래 신호 생성 시스템을 구축합니다. 이 전략은 충분한 유연성을 유지하면서도 강력한 위험 제어 능력을 갖추고 있으며, 양자 거래자에게 깊이 연구 할 가치가있는 거래 프로그램을 제공합니다.
/*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)