VWAP (Volume Weighted Average Price)

A session-anchored benchmark combining price and volume to show the average traded price, essential for intraday bias and execution quality.

VWAP is the ratio of total traded dollar value to total traded volume over the session. It represents the average price at which every share or contract has traded so far that day, weighted by how much traded at each price. A moving average only cares about price; VWAP also accounts for how much activity occurred at each level.

VWAP resets at the start of each session, which is why it's only meaningful on intraday charts. On a daily chart, the line simply tracks the session close — it tells you nothing useful. Use it exclusively on 1-minute to 60-minute charts.

How traders use it

### Intraday bias Price consistently above VWAP suggests net institutional buying for the session so far. Price consistently below VWAP suggests net selling. This gives a simple directional filter: only take long setups when price is above VWAP and holding above it after a retest.

### Fair value and execution Institutional traders are often measured against VWAP — executing better than VWAP is considered good execution. This means VWAP acts as a gravitational pull intraday; price tends to revisit it repeatedly throughout the session.

### VWAP standard deviation bands Adding standard deviation bands (±1σ, ±2σ) around VWAP gives overbought/oversold zones relative to the session's volume-weighted mean. A touch of the −2σ band in an uptrending session is a higher-quality long opportunity than a random RSI reading.

### Anchored VWAP Resetting VWAP to a specific event — an earnings release, a major swing high or low, a gap — lets you see the average price paid by everyone who bought or sold since that event. This is one of the most institutionally-relevant forms of support/resistance.

//@version=6
indicator("VWAP Demo", overlay=true)

// Built-in VWAP (resets each session automatically)
vwapValue = ta.vwap(hlc3)

// Manual VWAP with standard deviation bands
typicalPrice = hlc3
cumTPV   = ta.cum(typicalPrice * volume)
cumVol   = ta.cum(volume)
vwap2    = cumTPV / cumVol
variance = ta.cum(math.pow(typicalPrice - vwap2, 2) * volume) / cumVol
stdDev   = math.sqrt(variance)

upper1 = vwap2 + stdDev
lower1 = vwap2 - stdDev
upper2 = vwap2 + stdDev * 2
lower2 = vwap2 - stdDev * 2

plot(vwap2,  "VWAP",     color=color.orange,              linewidth=2)
plot(upper1, "+1σ",      color=color.new(color.blue, 30), linewidth=1)
plot(lower1, "-1σ",      color=color.new(color.blue, 30), linewidth=1)
plot(upper2, "+2σ",      color=color.new(color.red,  30), linewidth=1)
plot(lower2, "-2σ",      color=color.new(color.red,  30), linewidth=1)

Key takeaway: VWAP resets every session — this is not a limitation, it's the point. It only makes sense as a within-session measure. On daily charts it's meaningless. On intraday charts it's one of the most institutionally-relevant levels on the chart. The standard `ta.vwap` built-in resets automatically; for anchored VWAP to a specific event bar, use `ta.vwap(source, anchor_condition)` where the anchor condition is true only on the target bar.