All indicators

Auto Anchored Swing VWAP's

Sep 26, 2024

Static chart image
Support and ResistanceVolume BasedPivot Based (Retrospective)

The Auto Anchored Swing VWAP's indicator automatically anchors Volume-Weighted Average Price (VWAP) lines to the most recent swing highs and swing lows to identify dynamic support and resistance levels. By focusing on volume-weighted price action from significant market pivots, this tool helps traders visualize where the majority of trading volume has occurred since a specific price extreme.

Usage

The Usage section focuses on identifying trend shifts and potential reversal zones using the automatically generated VWAP lines.

  • Support and Resistance: When price is trading above an anchored VWAP line, it often serves as a support zone. Conversely, when price is below, the line can act as resistance.
  • Trend Identification: The slope and position of the VWAP relative to price can indicate the current market sentiment since the last significant swing.
  • Pivot Sensitivity: Use the Swing Lookback setting to adjust how the tool identifies highs and lows. A smaller lookback creates more frequent, short-term anchors, while a larger lookback focuses on major structural turns.

Details

The indicator utilizes the ta.pivothigh() and ta.pivotlow() functions to detect market turning points based on a user-defined lookback period. Once a swing point is confirmed (when price has moved a specific number of bars past the high/low), the script initializes a VWAP calculation starting precisely from that point.

Unlike standard daily VWAPs that reset at the start of each session, these Anchored VWAPs persist and update based on cumulative volume and price data from the anchor bar forward. The implementation uses Pine Script polyline and enum features to provide a clean visual interface with customizable line styles.

Settings

  • VWAP Source: Determines the price source used for the VWAP calculation (default is OHLC4).
  • Swing Lookback: Defines the number of bars required on either side of a high or low to confirm it as a swing point.
  • Swing High VWAP: Toggles the visibility of the VWAP anchored to swing highs and allows customization of color, width, and style (Solid, Dashed, Dotted).
  • Swing Low VWAP: Toggles the visibility of the VWAP anchored to swing lows and allows customization of color, width, and style.

FAQ

How do I access Auto Anchored Swing VWAP's?

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

What is the difference between this and a standard VWAP?

A standard VWAP usually resets every session (daily, weekly, etc.). An Anchored VWAP starts its calculation from a specific event or price point, such as a swing high or low, regardless of the time of day.

Why does the VWAP line appear several bars after a high or low?

The indicator requires confirmation of a swing point. If the "Swing Lookback" is set to 9, the indicator must wait for 9 bars to close to ensure the high/low was a true local extreme before it can begin the calculation.

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.