VWAP Deviation Oscillator
Oct 5, 2025

The VWAP Deviation Oscillator indicator transforms VWAP context into a clean, tradeable oscillator that measures price distance from various VWAP anchors across multiple assets and sessions. It enables traders to identify polarity shifts, overbought/oversold conditions, and the strength of price extensions through a standardized visual framework.
Usage
The Usage section highlights how to interpret the oscillator for different trading styles:
- Trend Following: Traders can use the zero line to determine bias. Positive values indicate a bullish bias, while negative values indicate a bearish bias. Support or resistance at the +1 or +2 sigma tiers during pullbacks often signals trend continuation.
- Mean Reversion: By using the Z-Score mode, traders can identify statistical extremes at ±2 to ±3 sigma levels. When the price fails to progress beyond these bands and the oscillator rolls back toward zero, it may signal a mean reversion opportunity.
- Session Context: Use "Daily" or "Weekly" modes for intraday or swing trading context. "Rolling" modes are effective for assets without clear session boundaries or for maintaining a continuous anchor that adapts to liquidity shifts.
Details
The script measures the gap between the price and a selected VWAP anchor, expressing it in three distinct ways: Percent, Absolute price units, or a standardized Z-Score.
To ensure the signal remains relevant during changing market conditions, the tool includes volatility guards that compute mode-specific sigma thresholds. The visual encoding uses a 10-zone color palette to grade the magnitude of deviation, helping traders quickly distinguish between mild rotational movements and decisive institutional imbalances.
Settings
Calculation Settings
- VWAP Mode: Choose between fixed session resets (4 Hours, Daily, Weekly) or dynamic trailing windows (Rolling Bars or Days).
- Rolling Lookbacks: Defines the trailing bar count or day count for the rolling VWAP calculation.
- Use Close instead of HLC3: Switches the price reference from the typical average (HLC3) to the closing price.
Deviation Mode
- Deviation Mode: Selects the measurement lens (Percent, Absolute, or Z-Score).
- Z/Std Window: Sets the lookback period for calculating the mean and standard deviation specifically for the Z-Score mode.
Volatility Controls
- Percent/Absolute Volatility Lookback: Sets the window used to estimate sigma for the respective modes.
- Minimum Sigma Guard: Prevents the sigma thresholds from collapsing during extremely low volatility periods in Percent mode.
Visual Settings
- Plot Type: Toggle between a Histogram (best for impulse) or a Line (best for trend waves).
- Show Standard Deviations: Displays symmetric ±1, ±2, and ±3 sigma rails.
- Fill Line Oscillator/Opacity: Controls the background fill for the line plot.
FAQ
How do I use the different deviation modes?
Percent mode is best for comparing stretches across different price levels, Absolute is used when raw price units matter for risk, and Z-Score is ideal for standardized, scale-invariant research.
What do the different colors represent?
The colors represent the magnitude of deviation. Deeper greens/reds indicate price is significantly far from the VWAP (beyond 2 or 3 sigma), while lighter shades suggest price is rotating near "fair value."
How can I access this tool?
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.