これは,取引量加重平均価格 (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)