SuperCharting
Sign in Get started Account Open charts

Learn / Indicators

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:

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

  1. Open an intraday chart, for example NSE:BANKNIFTY1! on the 5m interval.
  2. Click Indicators, type "vwap" and click Volume-weighted average price.
  3. Hover the legend and click the gear for Settings.
  4. On Inputs, choose the Anchor Period: Session, Week, Month, Quarter, Year, Decade or Century.
  5. Set Source (hlc3) and Offset. Tick Hide VWAP on 1D or Above if you only want it on intraday charts.
  6. 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.
  7. 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

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:

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

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.

Try it on a live chart

SuperCharting runs in your browser: charts, Pine-compatible scripts, the Strategy Tester, alerts and the screener, with Indian and global markets.

Create a free account More guides