
이 전략은 거래량 가중 평균 가격 ((VWAP), 실제 파도 지표 ((ATR) 과 가격 행동 분석을 결합한 일일 거래 전략이다. 이 전략은 가격과 VWAP의 교차 상황을 관찰하여 시장 추세를 판단하며, ATR을 동적으로 사용하여 중지 손실 및 수익 목표를 설정한다. 전략의 핵심 아이디어는 가격이 VWAP로 회귀할 때 거래 기회를 찾고, ATR을 통해 위험을 제어한다.
이 전략은 다음과 같은 핵심 원칙에 기초하고 있습니다.
이것은 기술 분석과 동적 위험 관리를 결합한 양적 거래 전략이다. VWAP와 ATR의 결합된 사용으로 거래 신호의 객관성을 보장하고 효과적인 위험 관리를 구현한다. 전략의 설계 사상은 현대적인 양적 거래의 요구 사항에 부합하며, 실용성과 확장성을 갖추고 있다. 제안된 최적화 방향으로 전략의 성능은 더 향상될 여지가 있다.
/*backtest
start: 2019-12-23 08:00:00
end: 2024-11-25 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Price Action + VWAP + ATR Intraday Strategy", overlay=true)
// VWAP Calculation
vwapValue = ta.vwap(close)
// ATR Calculation (14-period)
atr = ta.atr(14)
// Price Action Setup for Bullish and Bearish Trades
bullishCondition = close > vwapValue and close[1] < vwapValue // Price above VWAP (Bullish bias) and Price action pullback to VWAP
bearishCondition = close < vwapValue and close[1] > vwapValue // Price below VWAP (Bearish bias) and Price action rally to VWAP
// Set stop loss and take profit based on ATR
atrMultiplier = 1.5
longStopLoss = low - atr
shortStopLoss = high + atr
longTakeProfit = close + (atr * atrMultiplier)
shortTakeProfit = close - (atr * atrMultiplier)
// Entry and Exit Rules
// Bullish Trade: Price pullback to VWAP and a bounce with ATR confirmation
if (bullishCondition and ta.crossover(close, vwapValue))
strategy.entry("Long", strategy.long)
strategy.exit("Take Profit/Stop Loss", from_entry="Long", limit=longTakeProfit, stop=longStopLoss)
// Bearish Trade: Price rally to VWAP and a rejection with ATR confirmation
if (bearishCondition and ta.crossunder(close, vwapValue))
strategy.entry("Short", strategy.short)
strategy.exit("Take Profit/Stop Loss", from_entry="Short", limit=shortTakeProfit, stop=shortStopLoss)
// Plot VWAP on the chart
plot(vwapValue, color=color.blue, linewidth=2, title="VWAP")
// Plot ATR on the chart for reference (Optional)
plot(atr, title="ATR", color=color.orange, linewidth=1)