VWAP Anchored
Jul 12, 2019

The VWAP Anchored indicator provides a Volume Weighted Average Price calculation that begins from a specific user-defined point in time, allowing traders to identify value areas relative to significant market events.
Usage
The Usage of the VWAP Anchored tool centers around identifying the "starting line" for price discovery after a major catalyst, such as an earnings report, a central bank announcement, or a market open. Unlike standard VWAP, which typically resets daily, this version allows you to anchor the calculation to any historical date and time.
Traders often use this tool to:
- Identify dynamic support and resistance levels from a specific historical peak or trough.
- Determine if the average participant since a specific event is currently in a profit or loss position.
- Set alerts for price crossovers to capture shifts in sentiment relative to the anchor point.
Details
The script calculates VWAP by accumulating the product of price and volume (sum of Source * Volume) and dividing it by the cumulative volume since the specified anchor time. The "moment" variable uses the timestamp() function to define the exact starting point. Once the current bar's time matches or exceeds this anchor, the cumulative sums are reset, and the calculation begins anew.
Settings
- Source: Determines the price data used for the calculation (default is HLC3).
- Year: The four-digit year for the anchor point.
- Month: The month (1-12) for the anchor point.
- Day: The day of the month for the anchor point.
- Hour: The hour (0-23) for the anchor point.
- Minute: The minute (0-59) for the anchor point.
FAQ
How do I use the anchor inputs?
You can manually enter the date and time in the settings menu. Because the inputs are set to "confirm", you can also interactively select the starting point depending on your platform settings.
What happens if the anchor date is in the future?
The indicator will not display any value until the real-time or historical bar time reaches the specified timestamp.
How can I access the VWAP Anchored indicator?
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.