wma

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

Linearly weighted average: weight period on the newest value down to 1 on the oldest.

Parameters

NameTypeDefault
sourceArrayLike
periodint13

Indicator: Linear weighted moving average

Also known as lwma.

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

Average that weights the newest value N times and the oldest once.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint131 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.