VWAP indicator: session VWAP, bands and anchored VWAP explained
How to use the VWAP indicator in SuperCharting: anchor periods, standard deviation bands, VWAP Auto Anchored, the Anchored VWAP drawing and a VWAP alert.
VWAP (volume-weighted average price) is the average price paid since a starting point, with each bar weighted by its volume. Intraday traders use the session VWAP as a fair-value line: price above it means buyers have paid up on average today, below it means sellers are in control. In SuperCharting you add it from Indicators by searching "vwap". You can also anchor a VWAP to any bar with the Anchored VWAP drawing tool, or let VWAP Auto Anchored pick the anchor for you.
How VWAP is calculated
From the anchor bar onwards, the script adds up price × volume and divides by the total volume:
- VWAP = Σ (source × volume) / Σ volume
- The default source is hlc3, the average of high, low and close.
- At each new anchor period the sums start again from zero. With the default Session anchor, that is the first bar of each trading day.
Bars with heavy volume pull the line towards their price far more than quiet bars do. Early in the session VWAP moves a lot. Later in the day it settles, because each new bar is a smaller share of the total.
Volume is required
VWAP needs volume. If the feed sends no volume for a symbol, the script stops with the message "No volume is provided by the data vendor." Indices such as NSE:NIFTY are not traded themselves, so their volume may be missing. In that case, use the continuous future NSE:NIFTY1! or a liquid stock such as NSE:RELIANCE. For forex and CFDs such as EURUSD or XAUUSD, any volume comes from the broker's feed. It is usually tick volume, not exchange volume, so read the line with that in mind.
How to add VWAP in SuperCharting
- Open an intraday chart, for example NSE:BANKNIFTY1! on the 5m interval.
- Click Indicators, type "vwap" and click Volume-weighted average price.
- Hover the legend and click the gear for Settings.
- On Inputs, choose the Anchor Period: Session, Week, Month, Quarter, Year, Decade or Century.
- Set Source (hlc3) and Offset. Tick Hide VWAP on 1D or Above if you only want it on intraday charts.
- Under the bands settings, choose Bands Calculation Mode: Standard Deviation, or Percentage, where a multiplier of 1 means 1% from VWAP. Band #1 is on with multiplier 1. The second and third bands (multipliers 2 and 3) are off by default; their tick boxes sit on the Inputs tab next to each multiplier.
- Click Ok.
The Session anchor resets on each new trading day of the symbol. For NSE that is the 09:15 open. For forex it follows the feed's daily candle boundary.
Reading VWAP and its bands
- Bias: many intraday traders favour longs while price holds above session VWAP and shorts while it stays below.
- Pullbacks: in a trending session, the first pullbacks to VWAP are watched as possible entry areas. Repeated clean crosses through it suggest a range day.
- Bands: the standard deviation bands show how far price has stretched from VWAP. A move to the second band is a larger stretch than a touch of the first.
- Weekly and monthly anchors: swing traders anchor to the week or month to see the average price of that period's buyers.
These describe common practice, not instructions to trade. A volume profile shows where volume traded by price, which pairs well with VWAP's single average.
Anchored VWAP and VWAP Auto Anchored
The Anchored VWAP drawing
The drawing toolbar's Forecasting and measurement tools group has a Volume-based section with Anchored VWAP. Pick it and click a bar, such as the day of a results announcement or a major low. A VWAP is drawn from that bar to the latest bar, with a dashed vertical line marking the anchor. Drag the anchor to move it. It is a drawing, so it has no alerts. Other drawing tools are covered in drawing tools.
VWAP Auto Anchored
The built-in VWAP Auto Anchored, on the Indicators chip, draws a VWAP only from the start of the latest period. Its Anchor Period can be:
- Auto: Session on intraday charts, Month on 1D, Quarter on 2D to 10D, Year on 11D to 60D, Decade above that.
- Session, Week, Month, Quarter, Year, Decade or Century.
- Highest High, Lowest Low or Highest Volume: anchors at that bar within the last Length bars (10 by default). The line is redrawn when a newer extreme appears.
It has the same three bands as the standard VWAP.
A VWAP cross alert
The standard VWAP script defines no alerts, and a price alert compares price with a fixed number, not with a moving line. This script gives you alerts when the close crosses the session VWAP:
//@version=6
indicator("Session VWAP cross", "VWAP x", overlay = true)
mult = input.float(1.0, "Band multiplier", minval = 0.1, step = 0.5)
[vw, up, dn] = ta.vwap(hlc3, timeframe.change("D"), mult)
plot(vw, "VWAP", color.blue, 2)
plot(up, "Upper band", color.green)
plot(dn, "Lower band", color.green)
crossUp = ta.crossover(close, vw)
crossDown = ta.crossunder(close, vw)
alertcondition(crossUp, "Close crossed above VWAP", "Close crossed above session VWAP")
alertcondition(crossDown, "Close crossed below VWAP", "Close crossed below session VWAP")
Save it in the Script Editor and add it from My scripts. Then choose Add alert on VWAP x… in the legend's More menu, pick a condition and set Trigger to Once per bar close. The alert runs on the interval of the chart you created it from, so make it on the 5m chart if you want 5-minute closes. See price alerts for the other fields.
Other average-price tools
- Time-weighted average price (TWAP): averages ohlc4 over an anchor period (1D by default) without volume, so it works where volume is missing.
- Visible average price: the average close of the bars on screen.
- Volume-weighted moving average (VWMA): a rolling 20-bar average weighted by volume. It never resets, unlike VWAP.
Frequently asked questions
Why does VWAP jump at the start of each day?
With the Session anchor the sums reset on the first bar of each day, so the line starts again from that bar's price.
Should I use VWAP on a daily chart?
Session VWAP on a 1D chart resets every bar, so it says little there. Use the Week or Month anchor, or VWAP Auto Anchored with Auto, which picks Month on 1D.
Why does my VWAP differ from my broker's?
VWAP depends on the volume in the feed, the source price and the session start time. Different feeds, or tick volume against exchange volume, give different lines.
Does VWAP work in Bar Replay?
Yes. Replay shows the line only up to the replayed bar, so it builds up bar by bar as the session unfolds. See bar replay.