이 전략은 이동 평균(EMA), 방향성 이동 지수(DMI), 추세 제거 가격 오실레이터(DPO), 상대 강도 지수(RSI) 및 평균 진폭(ATR)을 결합한 여러 가지 기술 지표를 기반으로 하는 추세 추종 시스템입니다. ) 및 기타 기술 지표를 활용하여 강력한 추세를 파악하고 여러 신호 확인을 통해 거래합니다. 전략 설계의 핵심 아이디어는 추세 방향, 모멘텀, 변동성 등 다양한 시장 특성을 확인한 후에만 거래를 진행하여 거래 성공률을 높이는 것입니다.
이 전략은 다중 신호 확인을 위해 다른 기술 지표와 결합된 핵심 추세 판단 시스템으로 삼중 지수 이동 평균(EMA)을 사용합니다.
거래 신호 트리거 조건:
위험 관리 조치:
이 전략은 여러 기술 지표를 결합하여 적용하여 완전한 추세 추적 거래 시스템을 구축합니다. 이 전략의 주요 특징은 엄격한 신호 확인과 합리적인 위험 관리이며, 일간 수준에서 중기, 장기 추세를 추적하는 데 적합합니다. 어느 정도 지연은 있지만, 엄격한 위험 관리와 여러 신호 확인을 통해 전략의 전반적인 성과는 안정적입니다. 실제 거래에 적용할 때는 시장 환경의 선택에 주의를 기울이고, 특정 품종의 특성에 맞춰 매개변수를 최적화하는 것이 좋습니다.
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-15 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=5
strategy("Daily Strategy with Triple EMA, DMI, DPO, RSI, and ATR", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// Input parameters
fastEmaLength = input.int(10, title="Fast EMA Length")
mediumEmaLength = input.int(25, title="Medium EMA Length")
slowEmaLength = input.int(50, title="Slow EMA Length")
dmiLength = input.int(14, title="DMI Length")
adxSmoothing = input.int(14, title="ADX Smoothing")
dpoLength = input.int(14, title="DPO Length")
rsiLength = input.int(14, title="RSI Length")
atrLength = input.int(14, title="ATR Length")
riskPercentage = input.float(2.0, title="Risk Percentage", step=0.1)
atrMultiplier = input.float(1.5, title="ATR Multiplier for Stop Loss", step=0.1)
tpMultiplier = input.float(2.0, title="ATR Multiplier for Take Profit", step=0.1)
// Calculate EMAs
fastEma = ta.ema(close, fastEmaLength)
mediumEma = ta.ema(close, mediumEmaLength)
slowEma = ta.ema(close, slowEmaLength)
// Calculate other indicators
[adx, diPlus, diMinus] = ta.dmi(dmiLength, adxSmoothing)
dpo = close - ta.sma(close, dpoLength)
rsi = ta.rsi(close, rsiLength)
atr = ta.atr(atrLength)
// Trading logic
longCondition = ta.crossover(fastEma, mediumEma) and fastEma > slowEma and mediumEma > slowEma and adx > 25 and rsi > 50 and dpo > 0
shortCondition = ta.crossunder(fastEma, mediumEma) and fastEma < slowEma and mediumEma < slowEma and adx > 25 and rsi < 50 and dpo < 0
// Risk management
riskAmount = (strategy.equity * riskPercentage) / 100
stopLoss = atr * atrMultiplier
takeProfit = atr * tpMultiplier
// Entry and exit logic
if (longCondition)
strategy.entry("Buy", strategy.long)
strategy.exit("Exit Long", "Buy", stop=close - stopLoss, limit=close + takeProfit)
if (shortCondition)
strategy.entry("Sell", strategy.short)
strategy.exit("Exit Short", "Sell", stop=close + stopLoss, limit=close - takeProfit)
// Plot indicators
plot(fastEma, color=color.green, title="Fast EMA")
plot(mediumEma, color=color.orange, title="Medium EMA")
plot(slowEma, color=color.red, title="Slow EMA")
hline(25, "ADX Threshold", color=color.gray, linestyle=hline.style_dotted)