VWAP with Standard Deviation Bands
Jan 15, 2021

The VWAP with Standard Deviation Bands indicator provides a comprehensive volume-weighted average price analysis tool featuring both time-segmented and rolling calculation methods alongside customizable volatility bands.
Usage
The script can be used to identify institutional "fair value" and potential support or resistance levels based on volume distribution. Traders can use the time-segmented VWAP to track value across specific horizons like daily (1D), weekly (W), or monthly (M) periods. The addition of standard deviation bands helps identify overextended market conditions or volatility extremes.
Key applications include:
- Mean Reversion: Trading price action as it returns to the VWAP line from the outer bands.
- Trend Confirmation: Using the slope and position of price relative to the VWAP to determine market bias.
- Rolling Analysis: Using the Rolling VWAP for a continuous volume-weighted average that does not reset at period boundaries, providing a smoothed long-term view.
Details
VWAP is a moving average that assigns more weight to price levels with higher traded volume. This implementation offers two distinct logic flows:
- Time Segmented: Resets the accumulated price and volume data at the start of every selected period (e.g., every week). It also includes the ability to display the VWAP and bands from the previous period for historical context.
- Rolling: Uses a fixed lookback window (length) to calculate a continuous VWAP, ensuring that older data points are dropped as new bars form, similar to a traditional moving average but with volume weighting.
Settings
Time Segmented
- Time segmented VWAP Period: Selects the reset interval (1D, 2D, W, 14D, M, 60D, 12M, or Custom).
- Time segmented VWAP Custom Period: Defines the interval when "Custom" is selected.
- Show Current/Previous Time Segmented VWAP: Toggles the visibility of the current or prior period's VWAP line.
- Band Multipliers: Adjusts the width of the four standard deviation bands.
- Show STDEV Bands: Toggles the visibility for each individual standard deviation band for both current and previous periods.
Rolling
- Rolling VWAP Period: Sets the lookback length for the rolling calculation.
- Show Rolling VWAP: Toggles the visibility of the rolling VWAP line.
- Band Multipliers: Adjusts the standard deviation multipliers specifically for the rolling calculation.
- Show Rolling STDEV Bands: Toggles visibility for the rolling volatility bands.
FAQ
How do I use the Custom Period setting?
Set the "Time segmented VWAP Period" to "Custom" and then enter your desired timeframe string (e.g., "90D" for 90 days) in the "Custom Period" input field.
What is the difference between Time Segmented and Rolling VWAP?
Time Segmented VWAP resets its calculation to zero at the start of every new period (like a new week), while Rolling VWAP maintains a consistent lookback window of bars, never resetting.
How can I access this indicator?
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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.