Automated Anchored VWAP
May 28, 2022

The Automated Anchored VWAP indicator automatically calculates and plots the Anchored Volume Weighted Average Price (aVWAP) from the most recent pivot high and pivot low points. It simplifies technical analysis by dynamically updating anchor points as new market structure emerges, ensuring the most relevant volume-weighted levels are always visible on the chart.
Usage
The tool is designed to identify support and resistance levels derived from significant price pivots. When a new pivot high or low is confirmed based on the user-defined lookback and lookahead periods, the script resets the VWAP calculation to that specific point.
- Pivot Identification: The script marks Higher Highs (HH), Lower Highs (LH), Higher Lows (HL), and Lower Lows (LL).
- Dynamic Updating: Only the aVWAP from the most recent high and low pivots are tracked to maintain a clean chart.
- Break Early Feature: Users can enable a setting to stop plotting the aVWAP if price crosses through it, filtering out levels that may no longer be acting as effective support or resistance.
Details
The script uses standard ta.pivothigh and ta.pivotlow functions to detect structural turns. Once a pivot is confirmed (after the "Right Bars" period has passed), the indicator retrospectively calculates the volume and price data from the pivot bar to the current bar to initiate the aVWAP plot. Because pivots require a lookahead period for confirmation, the aVWAP line will appear on the chart with a slight delay corresponding to the "Right Bars" setting.
Settings
Pivots Settings
- Show Pivots: Toggles the visibility of pivot labels (HH, LH, HL, LL) on the chart.
- Left Bars Lookback: The number of bars required to the left of a high or low to qualify as a pivot.
- Right Bars Lookahead: The number of bars required to the right to confirm a pivot.
Tracking Settings
- Break Early: When enabled, the Pivot Low aVWAP stops plotting if the price falls beneath it, and the Pivot High aVWAP stops plotting if the price breaks above it.
FAQ
How do I access the Automated Anchored VWAP?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why does the line start several bars after the pivot?
The aVWAP requires the pivot to be confirmed before it can start calculating. This confirmation happens after the "Right Bars Lookahead" period has elapsed.
Can I track multiple historical pivots at once?
This specific tool is designed to keep charts clean by only tracking the most recent high and low pivots. For older pivots that are still relevant, it is recommended to use the manual Anchored VWAP drawing tool.
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.