
이 전략은 트렌드 방향 판단 (EMA 교차), 동력 강도 확인 (RSI와 MACD), 그리고 교차 검증 (OBV 트렌드와 OBV 트렌드) 을 포함하는 3 층의 필터링 메커니즘을 사용합니다. ATR 기반의 위험 제어 시스템을 갖추고 있습니다.
이 전략은 다음과 같은 3차 확인 메커니즘을 기반으로 작동합니다.
리스크 관리는 1.5배의 ATR을 절감 기준으로 사용하고, 기본 1: 2의 리스크 수익률은 수익률 목표를 설정한다.
이것은 잘 설계된 다층 확인 거래 전략이며, 여러 기술적 지표를 결합하여 비교적 신뢰할 수 있는 거래 신호를 제공합니다. 전략의 위험 관리 시스템은 비교적 완벽하지만, 특정 시장 환경에 따라 거래자가 변수를 최적화해야합니다. 이 전략은 변동성이 적고 유동성이 풍부한 시장에서 가장 적합하며, 거래자가 기술 분석 기반을 갖추어야합니다.
/*backtest
start: 2025-02-12 00:00:00
end: 2025-02-19 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Binance","currency":"SOL_USDT"}]
*/
//@version=5
strategy("5min Triple Confirmation Crypto Strategy", overlay=true, margin_long=100, margin_short=100)
// ===== Inputs =====
fast_length = input.int(9, "Fast EMA Length")
slow_length = input.int(21, "Slow EMA Length")
rsi_length = input.int(14, "RSI Length")
volume_ma_length = input.int(20, "Volume MA Length")
atr_length = input.int(14, "ATR Length")
risk_reward = input.float(2.0, "Risk:Reward Ratio")
// ===== 1. Trend Confirmation (EMA Crossover) =====
fast_ema = ta.ema(close, fast_length)
slow_ema = ta.ema(close, slow_length)
bullish_trend = ta.crossover(fast_ema, slow_ema)
bearish_trend = ta.crossunder(fast_ema, slow_ema)
// ===== 2. Momentum Confirmation (RSI + MACD) =====
rsi = ta.rsi(close, rsi_length)
[macd_line, signal_line, _] = ta.macd(close, 12, 26, 9)
bullish_momentum = rsi > 50 and ta.crossover(macd_line, signal_line)
bearish_momentum = rsi < 50 and ta.crossunder(macd_line, signal_line)
// ===== 3. Volume Confirmation (Volume Spike + OBV) =====
volume_ma = ta.sma(volume, volume_ma_length)
volume_spike = volume > 1.8 * volume_ma
obv = ta.obv
obv_trend = ta.ema(obv, 5) > ta.ema(obv, 13)
// ===== Entry Conditions =====
long_condition =
bullish_trend and
bullish_momentum and
volume_spike and
obv_trend
short_condition =
bearish_trend and
bearish_momentum and
volume_spike and
not obv_trend
// ===== Risk Management =====
atr = ta.atr(atr_length)
long_stop = low - 1.5 * atr
long_target = close + (1.5 * atr * risk_reward)
short_stop = high + 1.5 * atr
short_target = close - (1.5 * atr * risk_reward)
// ===== Strategy Execution =====
strategy.entry("Long", strategy.long, when=long_condition)
strategy.exit("Long Exit", "Long", stop=long_stop, limit=long_target)
strategy.entry("Short", strategy.short, when=short_condition)
strategy.exit("Short Exit", "Short", stop=short_stop, limit=short_target)
// ===== Visual Alerts =====
plotshape(long_condition, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(short_condition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
plot(fast_ema, "Fast EMA", color=color.blue)
plot(slow_ema, "Slow EMA", color=color.orange)