wma
forge.tafunctionSince Forge API 1
Functionpython
forge.ta.wma(source: ArrayLike, period: int = 13) -> np.ndarrayLinearly weighted average: weight period on the newest value down to 1 on the oldest.
Parameters
| Name | Type | Default |
|---|---|---|
| source | ArrayLike | |
| period | int | 13 |
Indicator: Linear weighted moving average
Also known as lwma.
Classpython
forge.ta.WMA(**inputs: Any) -> NoneAverage that weights the newest value N times and the oldest once.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| period | int | 13 | 1 to 5000 |
WMA[i] = (period * x[i] + (period - 1) * x[i-1] + ... + 1 * x[i-period+1]) / (period * (period + 1) / 2)
No value until period bars exist. A window holding a missing value has no value.