
이는 지수 이동 평균(EMA), 거래량 확인, 평균 추세율(ATR) 지표를 결합한 고급 양적 거래 전략입니다. 이 전략은 여러 가지 기술 지표를 사용하여 시장 동향을 정확하게 파악할 뿐만 아니라 볼륨 확인을 통해 거래 신뢰성을 향상시킵니다. 동시에 ATR을 사용하여 손절매 및 이익 실현 포지션을 동적으로 조정하여 포괄적인 위험 관리 시스템을 실현합니다. .
전략의 핵심 논리는 세 가지 주요 부분으로 구성됩니다.
이 전략은 여러 가지 기술 지표를 종합적으로 활용하여 논리적으로 엄격한 거래 시스템을 구축합니다. 이 전략의 핵심적인 장점은 다중 확인 메커니즘과 역동적인 위험 관리에 있지만, 추세 반전 및 거짓 거래량 돌파와 같은 위험에도 주의를 기울여야 합니다. 지속적인 최적화와 개선을 통해 이 전략은 실제 거래에서 더 나은 성과를 달성할 것으로 기대됩니다.
/*backtest
start: 2019-12-23 08:00:00
end: 2025-01-16 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT","balance":49999}]
*/
//@version=5
strategy("Enhanced Volume + Trend Strategy", overlay=true)
// Inputs
emaLength = input.int(50, title="EMA Length")
atrLength = input.int(14, title="ATR Length")
atrMultiplierSL = input.float(2.0, title="ATR Multiplier for Stop Loss")
atrMultiplierTP = input.float(3.0, title="ATR Multiplier for Take Profit")
volLength = input.int(20, title="Volume Moving Average Length")
volMultiplier = input.float(1.5, title="Volume Multiplier (Relative to Previous Volume)")
// Trend Detection using EMA
ema = ta.ema(close, emaLength)
// ATR Calculation for Stop Loss/Take Profit
atr = ta.atr(atrLength)
// Volume Moving Average
volMA = ta.sma(volume, volLength)
// Additional Volume Condition (Current Volume > Previous Volume + Multiplier)
volCondition = volume > volMA * volMultiplier and volume > volume[1]
// Entry Conditions based on Trend (EMA) and Volume (Volume Moving Average)
longCondition = close > ema and volCondition
shortCondition = close < ema and volCondition
// Stop Loss and Take Profit Levels
longStopLoss = close - (atr * atrMultiplierSL)
longTakeProfit = close + (atr * atrMultiplierTP)
shortStopLoss = close + (atr * atrMultiplierSL)
shortTakeProfit = close - (atr * atrMultiplierTP)
// Strategy Execution
if (longCondition)
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", "Long", stop=longStopLoss, limit=longTakeProfit)
if (shortCondition)
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", "Short", stop=shortStopLoss, limit=shortTakeProfit)
// Plotting EMA
plot(ema, color=color.yellow, title="EMA")
// Plot Volume Moving Average
plot(volMA, color=color.blue, title="Volume Moving Average")
// Signal Visualizations
plotshape(series=longCondition, color=color.green, style=shape.labelup, location=location.belowbar, title="Buy Signal")
plotshape(series=shortCondition, color=color.red, style=shape.labeldown, location=location.abovebar, title="Sell Signal")