
이 전략은 양평선 교차 시스템과 상대적으로 약한 지수 ((RSI) 를 결합한 트렌드 추적 전략이다. 9주기 및 21주기 지수 이동 평균 ((EMA) 의 교차로 시장 트렌드를 포착하는 동시에 RSI 지표를 사용하여 과매매 과매매 필터를 수행하고 거래 신호의 신뢰성을 높이기 위해 교류량을 확인하는 조합을 결합한다. 전략은 또한 실제 변동 폭 ((ATR) 에 기반한 동적 손실 제도를 통합하여 전반적인 위험을 통제한다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
빠른 EMA가 느린 EMA를 상향으로 가로질러 RSI가 40보다 커지고 거래량이 값을 초과할 때, 시스템은 다중 신호를 발생시킨다. 반대로, 빠른 EMA가 느린 EMA를 상향으로 가로질러 RSI가 60보다 작아지고 거래량이 확인될 때, 시스템은 공백 신호를 발생시킨다.
이 전략은 과학적으로 고전적인 기술 지표를 조합하여 논리적으로 엄격한 트렌드 추적 시스템을 구축한다. 전략의 다중 필터링 메커니즘과 위험 제어 수단은 실전 응용 가치가 있다. 제안된 최적화 방향을 통해 전략에는 추가적인 개선의 여지가 있다. 특히 변동성이 크고 유동성이 풍부한 시장에 적합하지만 사용하기 전에 충분한 테스트와 변수 최적화가 필요합니다.
/*backtest
start: 2024-11-07 00:00:00
end: 2025-02-18 08:00:00
period: 2d
basePeriod: 2d
exchanges: [{"eid":"Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("Call & Put Options Strategy (Optimized)", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// 📌 Configuration Parameters
emaShort = input(9, title="Short EMA")
emaLong = input(21, title="Long EMA")
rsiLength = input(14, title="RSI Period")
rsiOverbought = input(60, title="RSI Overbought") // Adjusted for more signals
rsiOversold = input(40, title="RSI Oversold") // More flexible to confirm buys
atrLength = input(14, title="ATR Period")
atrMult = input(1.5, title="ATR Multiplier for Stop Loss")
minVol = input(100000, title="Minimum Volume to Confirm Entry") // Volume filter
// 🔹 Indicator Calculations
emaFast = ta.ema(close, emaShort)
emaSlow = ta.ema(close, emaLong)
rsi = ta.rsi(close, rsiLength)
atr = ta.atr(atrLength)
vol = volume
// 📌 Entry Signal Conditions
condCALL = ta.crossover(emaFast, emaSlow) and rsi > rsiOversold and vol > minVol
condPUT = ta.crossunder(emaFast, emaSlow) and rsi < rsiOverbought and vol > minVol
// 🚀 Plot signals on the chart
plotshape(condCALL, location=location.belowbar, color=color.green, style=shape.labelup, title="CALL", size=size.small)
plotshape(condPUT, location=location.abovebar, color=color.red, style=shape.labeldown, title="PUT", size=size.small)
// 🎯 Alert conditions
alertcondition(condCALL, title="CALL Signal", message="📈 CALL signal confirmed")
alertcondition(condPUT, title="PUT Signal", message="📉 PUT signal confirmed")
// 📌 Risk Management - Stop Loss and Take Profit
longStop = close - (atr * atrMult)
shortStop = close + (atr * atrMult)
strategy.entry("CALL", strategy.long, when=condCALL)
strategy.exit("CALL Exit", from_entry="CALL", stop=longStop)
strategy.entry("PUT", strategy.short, when=condPUT)
strategy.exit("PUT Exit", from_entry="PUT", stop=shortStop)