All indicators

Two Days Auto Anchored VWAP

Feb 5, 2023

Static chart image
Dynamic OverlaysSupport and ResistanceVolume BasedSignals

The Two Days Auto Anchored VWAP indicator provides an efficient way to plot Anchored Volume Weighted Average Prices (AVWAP) starting from today's market open and the previous trading day's open. It is designed to help traders quickly identify intraday and multi-day value levels by automating the anchoring process.

Usage

The Usage section describes how the script can be used to monitor price action relative to key volume benchmarks. By default, the indicator anchors one VWAP to the start of the current session and another to the previous session.

  • Intraday Trend Analysis: Traders can compare the current session's AVWAP against the previous day's AVWAP. If the current AVWAP is trading above the previous day's line, it may indicate a bullish sentiment shift or trend continuation.
  • Support and Resistance: These levels often act as dynamic support or resistance. Price bouncing off the "Prev Day AVWAP" during a retracement can signal a high-conviction entry point.
  • Crossover Signals: The script includes built-in logic for crossovers between the two lines, which can be used to identify shifts in momentum between sessions.

Details

The script calculates the Volume Weighted Average Price by accumulating the product of price (Source) and volume, then dividing it by the total accumulated volume starting from a specific timestamp.

For the "Today" anchor, the calculation resets at the user-defined start time. For the "Prev Day" anchor, the script automatically attempts to calculate the previous workday's timestamp. If the current anchor falls on a Monday, the script subtracts three days to account for the weekend. In cases where the market was closed for a holiday, users have the option to manually override the previous day's anchor time to ensure accuracy.

Settings

Inputs

  • Source: Determines the price data used for the VWAP calculation (e.g., HLC3, Close).
  • Anchor Today: Sets the specific starting timestamp for today's Anchored VWAP.
  • Manually Set Prev Day: A toggle that, when enabled, allows the user to define a custom start time for the previous day's anchor instead of using the automatic calculation.
  • Anchor Prev Day: The timestamp used for the previous day's anchor if the manual override is enabled.

FAQ

How do I access Two Days Auto Anchored VWAP?

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

What happens if the previous day was a holiday?

If the automatic calculation points to a holiday where there is no data, you should enable the "Manually Set Prev Day" setting and select the correct prior trading session's open time using the date picker.

Can I change the price source used for the VWAP?

Yes, the "Source" setting in the Inputs tab allows you to switch between different price points such as OHLC4, HLC3, or simple Close prices depending on your preference.

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.