All indicators

Rolling Multiday VWAP

May 15, 2020

Static chart image
Support and ResistanceVolume BasedSignals

The Rolling Multiday VWAP indicator provides a dynamic volume-weighted average price calculation that spans multiple days, allowing traders to observe price value relative to volume over a rolling period rather than just the current session.

Usage

This tool is primarily used to identify institutional value over a broader timeframe than a standard intraday VWAP. By default, it is configured to track a 2-day period, which helps traders see the average price paid over the most recent 48 hours. Unlike traditional multiday VWAPs that might reset at the start of a new week or month, this tool dynamically anchors to a specific number of days backwards from the current moment.

Example use cases include:

  • Support and Resistance: Identifying where the average participant is "in the money" or "out of the money" over a 2-day or 3-day window.
  • Trend Confirmation: Using the multiday VWAP as a filter; if price is above the 2-day VWAP, the short-term bias is bullish.
  • Mean Reversion: Trading price extensions away from the rolling average back toward the multiday mean.

Details

The script calculates the Volume Weighted Average Price (VWAP) by summing the product of price (HLC3) and volume, then dividing by the cumulative volume over the specified lookback period.

A key technical feature of this implementation is the getTotalLookbackDays function, which accounts for weekends to ensure the "lookback" accurately reflects trading days. It dynamically identifies the starting "anchor" point based on the current time and the user-defined day count. This prevents the indicator from "resetting" or becoming a simple standard VWAP on new trading days, ensuring a consistent rolling multi-day window is always visible on the chart.

Settings

VWAP Configuration

  • VWAP Anchor Lookback (days): Determines how many days back the VWAP should begin its calculation. For example, setting this to 2 will provide a rolling 2-day volume-weighted average.

FAQ

How do I use the alerts included in the script?

The indicator includes built-in alerts for price crossovers and crossunders of the Multiday VWAP line. You can configure these by clicking the "Alerts" icon in the TradingView toolbar and selecting "Rolling Multiday VWAP" as the condition.

Why does the line start at a specific point in the past?

The line is designed to anchor dynamically based on your lookback setting. If set to 2 days, the calculation logic looks back to find the start of the trading period two days ago and begins the cumulative calculation from that specific point.

How can I access Rolling Multiday VWAP?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.