# forge.ta.alma

```python
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.

``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.

Since Forge API 1.

## Class forge.ta.ALMA

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

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

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])

Since Forge API 1.
