Skip to content
Algo Trade Analytics Docs

ta.vwma() - Pine Script Function

The vwma function returns volume-weighted moving average of source for length bars back. It is the same as: sma(source * volume, length) / sma(volume, length).

ta.vwma(source, length) → series float
NameTypeDescription
sourceseries int/floatSeries of values to process.

Volume-weighted moving average of source for length bars back.

  • na values in the source series are ignored.
//@version=6
indicator("ta.vwma")
plot(ta.vwma(close, 15))// same on pine, but less efficientpine_vwma(x, y) => ta.sma(x * volume, y) / ta.sma(volume, y)
plot(pine_vwma(close, 15))