Auto anchored VWAP Highest/Lowest Last 'n' bars
Feb 25, 2023

The Auto anchored VWAP Highest/Lowest Last 'n' bars indicator automatically identifies the highest and lowest price points within a user-defined lookback period and anchors Volume Weighted Average Price (VWAP) calculations to these specific benchmarks. This provides traders with dynamic support and resistance levels based on significant recent market extremes.
Usage
The indicator is primarily used to identify institutional value areas anchored to recent market turning points. Traders can utilize the output in the following ways:
- Support and Resistance: The VWAP line anchored to the lowest point often acts as a dynamic support level during uptrends, while the VWAP anchored to the highest point acts as resistance during downtrends.
- Trend Confirmation: Price holding above the "Highest" anchored VWAP suggests strong bullish momentum, while price staying below the "Lowest" anchored VWAP suggests bearish dominance.
- Mean Reversion: Large deviations from these anchored lines can signal overextended market conditions.
Details
This tool utilizes arrays to perform historical volume-weighted calculations from specific bar indices. Unlike standard VWAPs that reset at fixed time intervals (like daily or weekly), this version dynamically recalculates the anchor point based on the highest and lowest "Source" values found within the specified "Bars to look for" period. The script specifically targets the most significant price extremes of the recent session to provide context-dependent price levels.
Settings
- Bars to look for Highest/Lowest: Sets the lookback window (up to 3000 bars) used to find the highest and lowest price points for anchoring.
- Source: Determines the price data used for the VWAP calculation (e.g., hlc3, Close).
- Auto VWAP lowest touch Alert message: Customizes the notification text triggered when price interacts with the lower anchored VWAP.
- Auto VWAP highest touch Alert message: Customizes the notification text triggered when price interacts with the upper anchored VWAP.
FAQ
How do I access the Auto anchored VWAP Highest/Lowest Last 'n' bars?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the lookback period?
Yes, you can adjust the "Bars to look for" setting to align the indicator with different trading timeframes or session lengths.
Why are there two lines on my chart?
The indicator plots two distinct VWAP lines: one anchored to the highest high of the lookback period and one anchored to the lowest low.
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.