
이 전략은 트리플 슈퍼트렌드 지표와 지수 이동 평균(EMA)을 결합한 추세 추종 전략입니다. 시장 동향을 포착하기 위해 민감도가 다른 3개의 슈퍼트렌드선과 1개의 EMA를 설정함으로써 추세에 대한 다차원적 확인이 가능합니다. 이 전략은 ATR(평균 진폭)을 사용하여 동적 지지/저항 수준을 계산하고, 가격과 각 선 간의 위치 관계에 따라 추세 방향과 거래 신호를 결정합니다.
이 전략에는 주로 다음과 같은 핵심 구성 요소가 포함됩니다.
변동성이 큰 시장에서는 거래가 잦아지고 거래 비용이 증가할 수 있습니다. 해결책: 신호 필터를 추가하거나 이동 평균 기간을 연장할 수 있습니다.
추세 반전의 초기 단계에는 지연이 있을 수 있습니다. 대책: 판단을 돕기 위해 모멘텀 지표를 도입할 수 있습니다.
다중 확인 메커니즘으로 인해 일부 수익 창출 기회를 놓칠 수 있습니다. 대책: 확인 조건은 시장 특성에 따라 적절히 조정될 수 있습니다.
이는 엄격한 논리와 강력한 안정성을 갖춘 추세 추적 전략입니다. 다양한 기술 지표를 조화롭게 활용함으로써 신호의 신뢰성이 보장되고, 우수한 위험 관리 능력도 확보됩니다. 전략의 매개변수는 매우 조정 가능하며 다양한 시장 상황에 따라 최적화할 수 있습니다. 어느 정도 지연은 있지만, 적절한 최적화를 통해 위험과 수익 사이에 적절한 균형을 이룰 수 있습니다.
/*backtest
start: 2024-12-19 00:00:00
end: 2024-12-26 00:00:00
period: 45m
basePeriod: 45m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Supertrend EMA Strategy", overlay=true)
// Input Parameters
ema_length = input(50, title="EMA Length")
supertrend_atr_period = input(10, title="ATR Period")
supertrend_multiplier1 = input.float(3.0, title="Supertrend Multiplier 1")
supertrend_multiplier2 = input.float(2.0, title="Supertrend Multiplier 2")
supertrend_multiplier3 = input.float(1.0, title="Supertrend Multiplier 3")
// Calculations
emaValue = ta.ema(close, ema_length)
[supertrend1, SupertrendDirection1] = ta.supertrend(supertrend_multiplier1, supertrend_atr_period)
[supertrend2, SupertrendDirection2] = ta.supertrend(supertrend_multiplier2, supertrend_atr_period)
[supertrend3, SupertrendDirection3] = ta.supertrend(supertrend_multiplier3, supertrend_atr_period)
// Plot Indicators
plot(emaValue, title="EMA", color=color.blue, linewidth=2)
plot(supertrend1, title="Supertrend 1 (10,3)", color=(SupertrendDirection1 == -1 ? color.green : color.red), linewidth=1, style=plot.style_line)
plot(supertrend2, title="Supertrend 2 (10,2)", color=(SupertrendDirection2 == -1 ? color.green : color.red), linewidth=1, style=plot.style_line)
plot(supertrend3, title="Supertrend 3 (10,1)", color=(SupertrendDirection3 == -1 ? color.green : color.red), linewidth=1, style=plot.style_line)
// Entry Conditions
long_condition = (SupertrendDirection1 == -1 and SupertrendDirection2 == -1 and SupertrendDirection3 == -1 and close > emaValue)
short_condition = (SupertrendDirection1 == 1 and SupertrendDirection2 == 1 and SupertrendDirection3 == 1 and close < emaValue)
// Exit Conditions
long_exit = (SupertrendDirection3 == 1)
short_exit = (SupertrendDirection3 == -1)
// Execute Strategy
if (long_condition)
strategy.entry("Long", strategy.long)
if (short_condition)
strategy.entry("Short", strategy.short)
if (long_exit)
strategy.close("Long")
if (short_exit)
strategy.close("Short")