The Arnaud Legoux Moving Average, usually shortened to ALMA, weights the bars in its window with a Gaussian curve instead of equal weights or a straight-line ramp. Two settings control the curve. The offset, commonly 0.85, moves the peak of the bell toward the most recent bars. The sigma, commonly 6, sets how wide the bell is. The window length is often 9 by default.
The thinking is that a symmetric Gaussian centred in the window would be very smooth but lag badly, and a curve pushed all the way to the latest bar would be responsive but noisy. Putting the peak about 85 percent of the way along tries to sit between those two.
It's worth knowing that with those settings ALMA gives very little weight to the oldest few bars in the window. In practice a 9-bar ALMA behaves less like a 9-bar average and more like a shorter one with a smooth taper. That's why it often looks so close to price. Comparing it with a 9-period EMA without adjusting lengths isn't really a fair test.
For an M5 pullback approach, the useful comparison is lag against smoothness at a matched level. Pick an EMA length that has the same number of direction changes over a week of data as your ALMA, then look at which one turns sooner after real swing points. If ALMA turns earlier at equal smoothness, the Gaussian window is doing something. If they're about the same, it's mainly a different way to get the same line.
The offset setting is also a quiet source of overfitting. Moving it from 0.85 to 0.9 can make a backtest look noticeably better or worse, and there's no strong reason to prefer one value. Has anyone found a setting that holds up across several pairs without retuning?
ALMA, the Arnaud Legoux moving average: a Gaussian window shifted toward recent bars
-
Shadow Trader
- Posts: 6144
- Joined: Wed Sep 09, 2026 5:19 pm