
이 전략은 이동 평균선, 상대적으로 강한 지표와 추세 강도 지표를 결합한 통합 거래 시스템입니다. 다중 기술 지표의 협동 협동으로 시장 추세를 정확하게 포착하고 위험을 효과적으로 제어합니다. 시스템은 동적인 스톱 스톱 손실 메커니즘을 채택하여 거래의 위험 / 수익 비율을 보장하며 지표 매개 변수를 유연하게 조정하여 다양한 시장 환경에 적응합니다.
전략은 크게 세 가지 핵심 지표에 기반합니다. 빠른 지수 이동 평균 (((EMA), 상대적으로 강한 지수 (((RSI) 및 평균 트렌드 지수 (((ADX)). 빠른 EMA를 가로질러 빠른 EMA를 통과하면, 시스템은 RSI가 초과하지 않은 영역에 있는지 여부를 검사하며, ADX가 트렌드 강도를 충분히 보여주는 것을 확인합니다. (<60) 이 조건을 충족하면, 시스템은 여러 신호를 발산합니다.
이 전략은 다중 기술 지표의 통합적 사용을 통해 비교적 완전한 거래 시스템을 구축한다. 그것의 핵심 장점은 지표 협동으로 거래 신호의 신뢰성을 높이고, 동시에 동적인 위험 제어 메커니즘을 통해 거래의 안전을 보장한다는 것이다. 일부 고유 한 한계가 있지만, 제안 된 최적화 방향을 통해 전략은 여전히 큰 개선의 여지가있다. 전체적으로, 이것은 더 나은 최적화와 실전 응용에 적합한 실용적 가치가있는 거래 전략 프레임 워크이다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-23 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Enhanced EMA + RSI + ADX Strategy (Focused on 70% Win Rate)", overlay=true)
// Input parameters
lenFast = input.int(9, title="Fast EMA Length", minval=1)
lenSlow = input.int(21, title="Slow EMA Length", minval=1)
rsiPeriod = input.int(14, title="RSI Period")
adxPeriod = input.int(14, title="ADX Period")
adxSmoothing = input.int(1, title="ADX Smoothing")
adxThreshold = input.int(15, title="ADX Threshold")
riskRewardRatio = input.float(1.5, title="Risk/Reward Ratio")
rsiOverbought = input.int(60, title="RSI Overbought Level") // Adjusted for flexibility
rsiOversold = input.int(40, title="RSI Oversold Level")
// EMA Calculations
fastEMA = ta.ema(close, lenFast)
slowEMA = ta.ema(close, lenSlow)
// RSI Calculation
rsiValue = ta.rsi(close, rsiPeriod)
// ADX Calculation
[plusDI, minusDI, adxValue] = ta.dmi(adxPeriod, adxSmoothing)
// Entry Conditions with Confirmation
buyCondition = ta.crossover(fastEMA, slowEMA) and rsiValue < rsiOverbought and adxValue > adxThreshold
sellCondition = ta.crossunder(fastEMA, slowEMA) and rsiValue > rsiOversold and adxValue > adxThreshold
// Dynamic Exit Conditions
takeProfit = strategy.position_avg_price + (close - strategy.position_avg_price) * riskRewardRatio
stopLoss = strategy.position_avg_price - (close - strategy.position_avg_price)
// Entry logic
if (buyCondition)
strategy.entry("Buy", strategy.long)
strategy.exit("Sell", from_entry="Buy", limit=takeProfit, stop=stopLoss)
if (sellCondition)
strategy.close("Buy")
// Plotting EMAs
plot(fastEMA, color=color.new(color.green, 0), title="Fast EMA", linewidth=1)
plot(slowEMA, color=color.new(color.red, 0), title="Slow EMA", linewidth=1)
// Entry and exit markers
plotshape(series=buyCondition, style=shape.triangleup, location=location.belowbar, color=color.new(color.green, 0), size=size.normal, title="Buy Signal")
plotshape(series=sellCondition, style=shape.triangledown, location=location.abovebar, color=color.new(color.red, 0), size=size.normal, title="Sell Signal")
// Alerts
alertcondition(buyCondition, title="Buy Alert", message="Buy signal triggered")
alertcondition(sellCondition, title="Sell Alert", message="Sell signal triggered")