
이 전략은 상대 강도 지수(RSI), 가중 이동 평균(WMA), 지수 이동 평균(EMA)을 결합한 추세 추종 거래 시스템입니다. 이 전략은 RSI 값의 위치와 WMA와 EMA의 교차점을 모니터링하여 시장 추세 변화를 파악하고 이를 통해 매수 및 매도 신호를 생성합니다. 이러한 결합 방식은 시장의 매수 과다 및 매도 과다 조건을 고려할 뿐만 아니라, 다양한 기간의 이동 평균선에 대한 추세 판단을 결합하여 시장 전환점을 보다 정확하게 포착할 수 있습니다.
전략의 핵심 논리는 다음과 같은 핵심 요소에 기초합니다.
이 전략은 RSI, WMA, EMA라는 세 가지 기술 지표를 결합하여 비교적 완전한 추세 추적 시스템을 구축합니다. 이 전략의 핵심적인 장점은 신호의 신뢰성과 위험 관리 능력에 있지만, 동시에 변동성이 큰 시장에서는 거짓 신호의 위험에도 주의해야 합니다. 변동성 필터링, 추세 강도 확인과 같은 최적화 조치를 추가함으로써 전략의 안정성과 수익성을 더욱 개선할 수 있습니다. 전반적으로 이는 실용적인 가치가 있는 거래 전략이며, 특히 중기 및 장기 추세 거래자에게 적합합니다.
/*backtest
start: 2024-12-17 00:00:00
end: 2025-01-16 00:00:00
period: 1h
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=5
strategy(title="RSI + WMA + EMA Strategy", shorttitle="RSI Strategy", overlay=true)
// RSI Settings
rsiLengthInput = input.int(14, minval=1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
// WMA and EMA Settings
wmaLengthInput = input.int(45, minval=1, title="WMA Length", group="WMA Settings")
wmaColorInput = input.color(color.blue, title="WMA Color", group="WMA Settings")
emaLengthInput = input.int(89, minval=1, title="EMA Length", group="EMA Settings")
emaColorInput = input.color(color.purple, title="EMA Color", group="EMA Settings")
// RSI Calculation
change = ta.change(rsiSourceInput)
up = ta.rma(math.max(change, 0), rsiLengthInput)
down = ta.rma(-math.min(change, 0), rsiLengthInput)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
// WMA and EMA Calculation
wma = ta.wma(rsi, wmaLengthInput)
ema = ta.ema(rsi, emaLengthInput)
// Plot RSI, WMA, and EMA
plot(rsi, "RSI", color=#7E57C2)
plot(wma, title="WMA", color=wmaColorInput, linewidth=2)
plot(ema, title="EMA", color=emaColorInput, linewidth=2)
// Entry and Exit Conditions
longCondition = ta.crossover(wma, ema) and rsi < 50
shortCondition = ta.crossunder(wma, ema) and rsi > 50
if (longCondition)
strategy.entry("Long", strategy.long)
if (shortCondition)
strategy.entry("Short", strategy.short)
// Optional: Plot Buy/Sell Signals on Chart
plotshape(series=longCondition, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, title="Buy Signal")
plotshape(series=shortCondition, style=shape.labeldown, location=location.abovebar, color=color.red, size=size.small, title="Sell Signal")