Volume weighted moving average

vwmamoving_averagesForge API 1

Average that weights each price by the volume traded at it.

Inputs

NameTypeDefaultRange
sourcesourceclose
volumevolumetick
periodint201 to 5000

Outputs

NameTypeRequiredDescription
vwmavalueOptionalcolor theme.accent, style line, width 1
Warm-up
period - 1 bars (19 at the defaults)
Repaints
No
Parity
None

Formula

VWMA[i] = sum(x[j] * v[j]) / sum(v[j]) over the last period bars

No value until period bars exist, or where the volume in the window adds to zero.