VWAP (Volume Weighted Average Price)

VWAP is an average price weighted by traded volume that restarts each day; a favourite benchmark of day traders and institutions.

What it is

The volume weighted average price shows the average price at which the market has traded today. Prices where more volume changed hands weigh more. Funds and institutional traders use VWAP to judge how well their orders were filled.

How it's calculated

  1. Each candle's typical price = (high + low + close) ÷ 3
  2. VWAP = sum of (typical price × volume) ÷ sum of volume, from the start of the session

How traders read it

  • Price above VWAP means buyers are in control today; below means sellers.
  • VWAP often acts as support or resistance during the day.
  • A large gap between price and VWAP can be followed by a move back toward it.

Settings

Classic VWAP resets each day. For a longer view, try a weekly or monthly VWAP, or a Rolling VWAP over a fixed time window.

Where it misleads

  • VWAP depends on volume; in markets without centralised volume, such as forex, tick volume stands in and is less precise.
  • VWAP is built for intraday trading and means little on daily and higher timeframes.

Its Pine Script on Vlevel

This is the script the chart runs. In the chart's indicators window you can open it, change it and save your own copy.

Volume Weighted Average Price · Pine Script v6
//@version=6
indicator("Volume Weighted Average Price", shorttitle = "VWAP", overlay = true)
anchor = input.string("Session", "Anchor Period", options = ["Session", "Week", "Month", "Quarter", "Year"])
isNew = switch anchor
    "Session" => timeframe.change("D")
    "Week" => timeframe.change("W")
    "Month" => timeframe.change("M")
    "Quarter" => timeframe.change("M") and (month - 1) % 3 == 0
    => timeframe.change("M") and month == 1
src     = input.source(hlc3, "Source")
offset  = input.int(0, "Offset")
showB1  = input.bool(false, "Bands #1", group = "Bands", inline = "b1")
mult1   = input.float(1.0, "Multiplier #1", group = "Bands", inline = "b1")
showB2  = input.bool(false, "Bands #2", group = "Bands", inline = "b2")
mult2   = input.float(2.0, "Multiplier #2", group = "Bands", inline = "b2")
showB3  = input.bool(false, "Bands #3", group = "Bands", inline = "b3")
mult3   = input.float(3.0, "Multiplier #3", group = "Bands", inline = "b3")
var float pv = 0.0
var float v = 0.0
var float pv2 = 0.0
if isNew
    pv := 0.0
    v := 0.0
    pv2 := 0.0
pv += src * volume
v += volume
pv2 += src * src * volume
vwap = v > 0 ? pv / v : src
sd = v > 0 ? math.sqrt(math.max(pv2 / v - vwap * vwap, 0)) : 0
plot(vwap, "VWAP", color = #ff9f43, offset = offset)
plot(showB1 ? vwap + sd * mult1 : na, "Upper Band #1", color = #2ee6a6, offset = offset)
plot(showB1 ? vwap - sd * mult1 : na, "Lower Band #1", color = #2ee6a6, offset = offset)
plot(showB2 ? vwap + sd * mult2 : na, "Upper Band #2", color = #808000, offset = offset)
plot(showB2 ? vwap - sd * mult2 : na, "Lower Band #2", color = #808000, offset = offset)
plot(showB3 ? vwap + sd * mult3 : na, "Upper Band #3", color = #00897b, offset = offset)
plot(showB3 ? vwap - sd * mult3 : na, "Lower Band #3", color = #00897b, offset = offset)

Indicators describe past prices; none predicts the future. For education, not investment advice.