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.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.