All indicators

VWAP Divergence

Sep 8, 2023

Static chart image
Volume BasedSignalsDivergencesVolatility

The VWAP Divergence tool identifies discrepancies between price action and the Volume Weighted Average Price (VWAP) to highlight potential trend reversals. By applying volatility-based filters, it aims to reduce false signals and pinpoint high-quality divergence opportunities.

Usage

The indicator plots signals directly on the chart to assist with trend analysis:

  • Bullish Divergence: Indicated by green dots below the candle. These appear when the price shows significant upward momentum over the lookback period while the VWAP is decreasing.
  • Bearish Divergence: Indicated by red dots above the candle. These appear when the price shows significant downward momentum over the lookback period while the VWAP is increasing.

The tool includes a customizable VWAP line that can be set to "Trend Coloring" mode, which alternates colors based on whether the VWAP is currently increasing or decreasing.

Details

Divergences are calculated by comparing price movement against an ATR-based threshold. A signal is triggered when the price movement over the specified lookback period is greater than the ATR multiplied by the user-defined multiplier. This ensures that only "sharp" movements—relative to current market volatility—trigger a divergence signal. Additionally, the script includes logic to ignore signals during periods with significant price gaps and enforces a minimum distance between consecutive signals to avoid clutter.

Settings

VWAP Settings

  • Hide VWAP on 1D or Above: When enabled, the VWAP line will not be displayed on daily or higher timeframes.
  • Anchor Period: Determines the reset frequency for the VWAP calculation (e.g., Session, Week, Month, Earnings).
  • Source: The price input used for VWAP calculations (default is HLC3).
  • Offset: Shifts the VWAP line forward or backward in time.

Divergence Settings

  • Lookback Period: Sets the window of bars used to measure price momentum for divergence detection.
  • ATR Multiplier: Controls the sensitivity of the filter; higher values require more aggressive price movements to trigger a signal.

Visual Settings

  • VWAP Colors: Sets the color for increasing and decreasing VWAP.
  • Trend Coloring: Enables or disables the alternating color scheme for the VWAP line.
  • Show VWAP: Toggles the visibility of the VWAP plot.
  • Divergence Plot Size: Adjusts the visual size of the divergence dots (Small, Normal, Large).

Alert Settings

  • Bearish/Bullish alerts: Toggles the execution of alerts for specific divergence types.

FAQ

How do I use the VWAP Divergence on different timeframes?

Due to the nature of volatility, the ATR multiplier and lookback period should generally be set lower on higher timeframes or for less volatile assets to account for more averaged price movements.

Can I change the anchor for the VWAP?

Yes, the indicator supports multiple anchors including standard time-based periods (Session, Week, Month) and event-based anchors like Earnings or Dividends.

How can I access VWAP Divergence?

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.