vwma
forge.tafunctionSince Forge API 1
Functionpython
forge.ta.vwma(source: ArrayLike,volume: ArrayLike,period: int = 20) -> np.ndarrayVolume weighted average: sum(price * volume) / sum(volume) over the last period bars.
Parameters
| Name | Type | Default |
|---|---|---|
| source | ArrayLike | |
| volume | ArrayLike | |
| period | int | 20 |
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) -> NoneAverage that weights each price by the volume traded at it.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| volume | volume | tick | |
| period | int | 20 | 1 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.