vwma

forge.tafunctionSince Forge API 1
Functionpython
forge.ta.vwma(source: ArrayLike,volume: ArrayLike,period: int = 20) -> np.ndarray

Volume weighted average: sum(price * volume) / sum(volume) over the last period bars.

Parameters

NameTypeDefault
sourceArrayLike
volumeArrayLike
periodint20

Indicator: Volume weighted moving average

NaN where the window holds a missing value or its volume adds to zero.

Classpython
forge.ta.VWMA(**inputs: Any) -> None

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

Inputs

NameTypeDefaultRange
sourcesourceclose
volumevolumetick
periodint201 to 5000

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.