◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Indicators / Arnaud Legoux Moving Average (ALMA)
Trend indicator

Arnaud Legoux Moving Average (ALMA)

A Gaussian-weighted moving average designed to reduce lag while keeping the line smooth.

Illustrative diagram — not live market data.

What it is

The Arnaud Legoux Moving Average (ALMA) is a moving average developed in 2009 by Arnaud Legoux and Dimitris Kouzis-Loukas. Like any moving average, it plots a single smoothed line over price. What sets ALMA apart is how it weights the data: instead of weighting every bar equally (as a simple moving average does) or weighting recent bars most heavily in a fixed way (as an exponential moving average does), ALMA applies a Gaussian (bell-curve) weighting whose peak can be shifted along the lookback window. The aim is to balance two things that usually trade off against each other in a moving average: smoothness (less reaction to noise) and lag (how far the line trails behind price). ALMA is a descriptive smoothing tool. It summarizes past prices and is not predictive of future prices.

How it works

ALMA takes a lookback window of bars and assigns each bar a weight from a Gaussian (bell-shaped) curve, then sums the weighted prices to produce one value per bar. Three settings control the shape and position of that curve. The "window" (length) sets how many bars are included. "Offset" (typically 0 to 1) slides the peak of the bell curve along the window: an offset near 1 places the peak on the most recent bars, which reduces lag but makes the line more reactive (noisier); an offset near 0 places the peak on older bars, which adds smoothness and lag. "Sigma" controls how wide or narrow the bell is: a smaller sigma concentrates weight tightly around the peak (more responsive, less smooth), while a larger sigma spreads weight out (smoother, more lag). By tuning offset and sigma together, a trader can dial the curve toward responsiveness or smoothness. In Pine Script, ALMA is available as the built-in ta.alma(series, length, offset, sigma).

How traders read it

Common settings

A common starting point is a length of 9 to 21 with offset around 0.85 and sigma around 6, but there is no universally correct setting. Higher offset and lower sigma make the line faster and noisier; lower offset and higher sigma make it smoother and slower. Settings should be chosen for the timeframe and instrument and treated as a tradeoff, not an optimization target.

Strengths

Pitfalls to watch

Pine v6 example

//@version=6
indicator("ALMA Example", overlay = true)

length = input.int(21, "Length", minval = 1)
offset = input.float(0.85, "Offset", minval = 0.0, maxval = 1.0)
sigma  = input.float(6.0, "Sigma", minval = 0.1)

almaLine = ta.alma(close, length, offset, sigma)

plot(almaLine, "ALMA", color = color.blue, linewidth = 2)

// Educational only. Not advice, not a signal. Nothing here is predictive; trading carries risk of loss.

Pro tip: If you adjust ALMA's settings, change offset and sigma deliberately and one at a time so you can see what each does, rather than searching for the combination that looks best on past data. A curve that fits history neatly is not evidence it will behave the same way later.

Built an indicator from this? Run it through the Validator to catch look-ahead bias and repainting, or convert a strategy to Pine Script.

Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro