Docs

ta.vwap

Show the average price paid across the run or within each session, weighted by volume.

itm
ta.vwap(source, bars, reset)

Volume-weighted average price accumulated from the first bar of the run, or of each period with reset: sum(source*volume)/sum(volume), volume read from bars.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeUnitDefaultRangeDescription
sourceSeriesnumber---Typically hlc3.
barsConstantbarsbarsna-Which bars to read: a declared series, or na for the chart's own.
resetConstantstring---Restarts the two sums at the first bar of each session, day, week, month, quarter or year (an option, written reset=session).

Output

NameTypeUnit
valuenumber-

Warm-up and missing values

Warm-up
1 bar.
Missing values
na until one bar with non-na volume has been seen, and again after each restart. It accumulates from the first bar of the run, or of each period with reset. reset=session never restarts on daily bars or a 24/7 calendar.

Example

itm
ta.vwap(hlc3)
itm
plot(ta.vwap(hlc3, reset=session), "Session VWAP")