Docs

ta.vwma

Average a series with each bar weighted by its volume.

itm
ta.vwma(source, length, bars)

Volume-weighted moving average: sum(source*volume)/sum(volume) over the window, volume read from bars. na when the window has no volume.

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---The series to read.
lengthConstantnumber--1 to 10000Window in observed bars.
barsConstantbarsbarsna-Which bars to read: a declared series, or na for the chart's own.

Output

NameTypeUnit
valuenumber-

Warm-up and missing values

Warm-up
length bars. Names in the warm-up are this operator’s parameters.
Missing values
Returns na until length consecutive non-na observations are in the window. An na resets the accumulation.

Example

itm
ta.vwma(close, 20)
itm
plot(ta.vwma(close, 20), "Volume weighted 20")