VWAP with editable Volume Time Frame
Jun 11, 2020

The VWAP with editable Volume Time Frame indicator provides a flexible Volume Weighted Average Price calculation that allows traders to specify the anchor period independently of the chart resolution. This tool aims to give users more control over how volume-weighted data is aggregated, enabling more precise trend and value identification across various trading styles.
Usage
The Usage section focuses on identifying key support and resistance levels based on volume-weighted averages from specific timeframes. Unlike the standard VWAP which often defaults to the daily session, this version allows you to anchor the calculation to any timeframe (e.g., Weekly, Monthly, or even intraday intervals).
Traders can use this to:
- Identify the "fair value" of an asset over a custom-defined period.
- Spot potential reversals when the price crosses over or under the VWAP line.
- Maintain a higher-timeframe perspective (like a Daily VWAP) while trading on lower-timeframe charts (like the 5-minute or 1-minute).
Details
This script implements a manual calculation of the Volume Weighted Average Price by tracking the cumulative product of price and volume, divided by the cumulative volume. The calculation resets whenever a new bar of the selected "Time Frame" input begins. This logic ensures that the user can visualize higher-order volume data without needing to switch their primary chart resolution. The script also includes built-in alert conditions for price crossovers, aiding in timely decision-making.
Settings
- Source: Determines the price data point used for the calculation (e.g., Close, HL2, OHLC4).
- Time Frame: Sets the anchoring period for the VWAP calculation (e.g., D for Daily, W for Weekly, M for Monthly).
FAQ
How do I use the Time Frame setting?
You can change the "Time Frame" input to any valid TradingView resolution. For example, setting it to "W" will calculate a Weekly VWAP that resets at the start of every week, regardless of whether you are looking at a 15-minute or 1-hour chart.
What do the alerts signify?
The alerts are triggered when the market price crosses above or below the VWAP line. A crossover above may indicate bullish momentum, while a crossunder may indicate bearish momentum relative to the volume-weighted average.
How can I access this tool?
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.