alma

forge.tafunctionSince Forge API 1
Functionpython
forge.ta.alma(source: ArrayLike,window: int = 9,offset: float = 0.85,sigma: float = 6.0) -> np.ndarray

Arnaud Legoux average: Gaussian weights over window bars.

Parameters

NameTypeDefault
sourceArrayLike
windowint9
offsetfloat0.85
sigmafloat6.0

Indicator: Arnaud Legoux moving average

m = offset * (window - 1), s = window / sigma and the weight of the bar k places from the oldest is exp(-(k - m)^2 / (2 s^2)). An offset near 1 puts the peak on the newest bar.

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

Gaussian weighted average whose peak you can move toward the newest bar.

Inputs

NameTypeDefaultRange
sourcesourceclose
windowint91 to 5000
offsetfloat0.850 to 1
sigmafloat60.5 to 50

m = offset * (window - 1), s = window / sigma

w[k] = exp(-(k - m)^2 / (2 * s^2)), k = 0 for the oldest bar of the window

ALMA[i] = sum(w[k] * x[i-window+1+k]) / sum(w[k])