OPEN-SOURCE SCRIPT
2-Day Rolling VWAP

2-Day Rolling VWAP extends the traditional Volume Weighted Average Price calculation beyond a single session, providing a smoother and more stable reference level that spans two full trading days. While standard VWAP resets at the start of each new session, this rolling approach maintains continuity by continuously calculating the volume-weighted average price over the most recent 48-hour window—making it particularly valuable for swing traders and those holding positions overnight who need context beyond intraday levels. The indicator automatically manages historical data, dropping the oldest day's bars as each new trading day begins to maintain a consistent 2-day lookback. Optional percentage-based bands (default ±1%) provide dynamic support and resistance zones around the rolling VWAP, helping identify potential mean-reversion opportunities when price extends too far from the volume-weighted fair value. Visual crossover signals—green triangles below bars when price crosses above VWAP, red triangles above bars when price crosses below—highlight potential momentum shifts and entry/exit points. The source input allows calculation based on close, open, high, low, or any custom value. Whether you're looking for a more stable intraday anchor than single-session VWAP, identifying multi-day value areas, or timing entries around volume-weighted levels, this rolling VWAP provides the extended context that traditional VWAP calculations lack.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。