Technical Analysis

Arnaud Legoux Moving Average (ALMA) Guide

By Jacob Denbrock14 min readReviewed by Sean Mackey on
Arnaud Legoux Moving Average (ALMA) Guide

The Arnaud Legoux Moving Average (ALMA) is a windowed weighted average whose weights follow a Gaussian bell curve laid across the lookback, with the bell's peak shifted toward the most recent bars. Arnaud Legoux and Dimitrios Kouzis-Loukas published it in 2009 as a practical answer to the oldest complaint about smoothing: averages smooth enough to ignore noise are usually too slow to catch turns. Where a simple average weights every bar equally and an exponential average decays monotonically into the past, ALMA concentrates weight around a chosen point in the window and tapers off on both sides. Two dials, offset and sigma, decide where that peak sits and how wide the bell is, so the same length can be tuned toward responsiveness or toward smoothness without switching average type. It is not a strict upgrade over the classics, and the Library says so plainly: for a given amount of smoothing it often shows less lag than a simple average and less noise than an exponential one, but it still lags real turns, still whipsaws in ranges, and its extra parameters add tuning risk.

Key points:

  • Three inputs: window length (default 9), offset (default 0.85) and sigma (default 6), following Legoux's original release.
  • Offset places the peak: near 1 the average leans on the newest bars and turns faster; toward 0.5 it centres the bell and smooths more at the cost of lag.
  • Sigma sets the width: larger sigma narrows the bell around the peak, smaller sigma spreads weight more evenly toward a simple average.
  • Finite window, no repaint: the value depends only on the last N closed bars, with no infinite tail of old data as in an exponential average, and a standard ALMA does not repaint.

The LuxAlgo Moving Average indicator includes ALMA as a type with its own Offset and Sigma inputs and an optional second average with cross alerts, and it opens on Quant Charts in one click. Quant, our coding agent, can turn an ALMA rule into a strategy you can inspect in Code and test with Run.

How ALMA Is Calculated

The Library's ALMA page gives the construction in four steps. Index the bars in the window from 0 (oldest) to N − 1 (newest). Locate the peak at m = offset × (N − 1). Set the bell's width at s = N ÷ sigma. Weight each bar by w(i) = exp(−(i − m)² ÷ (2 × s²)), so bars near the peak dominate and bars far from it contribute little. The output is the weighted sum of the N prices divided by the sum of the weights. Because there is no recursion, ALMA belongs to the windowed FIR family of smoothers: it is a plain weighted sum over a window, which is also what makes it inspectable.

The Three Parameters

InputDefaultWhat it doesDirection
Window (length)9Number of bars in the weighted sumLonger smooths more and lags more; shorter tracks price more tightly
Offset0.85Position of the weight peak inside the window, from 0 (oldest) to 1 (newest)Toward 1: faster, less smooth. Toward 0.5: centred, smoother, laggier
Sigma6Width of the bell relative to the window, s = N ÷ sigmaLarger sigma narrows the bell around the peak; smaller sigma flattens the weights toward a simple average

The sigma direction trips people up because it runs opposite to intuition: a larger sigma value means a narrower bell, not a wider one, since sigma divides the window length. At the defaults, N = 9, offset 0.85 and sigma 6, the peak sits at position 6.8 and the standard deviation of the bell is 1.5 bars, so the newest three bars carry most of the weight and the oldest three carry almost none.

A Worked Nine-Bar Example

The table applies the default weights to nine hypothetical closes rising from $100.00 to $103.50. The weights are normalised so they sum to one.

Position iCloseDistance from peak (i − 6.8)Normalised weightContribution
0 (oldest)$100.00−6.80.000$0.00
1$100.40−5.80.000$0.02
2$100.90−4.80.002$0.18
3$101.30−3.80.012$1.24
4$101.00−2.80.053$5.37
5$101.60−1.80.148$15.02
6$102.20−0.80.263$26.92
7$102.80+0.20.301$30.94
8 (newest)$103.50+1.20.220$22.82
ALMA (9, 0.85, 6)$102.50; 9-bar SMA $101.52; 9-bar EMA about $101.83; ALMA with offset 0.5 $101.37

On a steadily rising series the default ALMA sits a dollar closer to the latest close than the simple average and well above the exponential average, which is the lag reduction the design promises. Move the offset to 0.5 and the bell centres on the middle of the window: the output drops to $101.37, below the simple average, because the centred bell now ignores the newest bars almost as much as the oldest. That single comparison is the whole parameter story. Offset buys responsiveness with smoothness; sigma decides how sharply the trade is made.

ALMA Against the Other Averages

Every moving average is a filter, and every filter trades lag against noise. The averages differ in the shape of their weights and in whether they use a finite window or a recursive tail, and those two properties explain most of what a chart shows. Legoux compared his average most often with the Hull Moving Average, an extrapolative low-lag design that combines weighted averages in a way that can overshoot at turns; the Library describes ALMA's off-centre bell as typically the gentler route to lag reduction.

AverageWeightingWindowLag versus noiseParameters
SMAEqual weightsFiniteMaximum smoothing for the window; reacts late and drops old bars abruptlyLength
EMAExponential decayRecursive, infinite tailFaster than an SMA of the same length; passes more noise; one setting fixes the responseLength
WMALinear decayFiniteBetween SMA and EMA in both respectsLength
HMACombination of weighted averagesFiniteVery low lag; can overshoot at turnsLength
ALMAGaussian bell, peak shifted toward recent barsFiniteSmoother than an EMA of comparable lag, more responsive than an SMA of comparable smoothness; still lags turnsLength, offset, sigma

Two consequences follow. First, ALMA is tunable in both directions with the same length, which is useful when you want one setup re-tuned per market rather than a different average per market. Second, more dials mean more ways to curve-fit: three parameters swept over a history will find a combination that looked good, and the Library's page names that tuning risk as the price of the flexibility. ALMA is also not adaptive. The window is fixed rather than condition-driven, so unlike a KAMA or another adaptive-lookback average, it does not speed up or slow down with volatility; its responsiveness is set by where the bell sits, not by market state.

Using ALMA on a Chart

LuxAlgo Moving Average indicator on Quant Charts with a moving average plotted over candlesticks
The LuxAlgo Moving Average on Quant Charts, from the Library preview. The type selector includes ALMA with its own Offset and Sigma inputs, and a second average can be enabled for crossover work.

Trend Filter and Slope

The elementary use is the trend filter: price above a rising ALMA favours the long side, price below a falling one the short side, and the slope carries most of the information. Because the Gaussian window suppresses bar-to-bar jitter, ALMA's slope flips sign less often than a comparably fast exponential average's, which makes it a reasonable engine for an MA slope filter or a simple trend regime label. A flattening average is a warning that the trend is losing pace; it is not, on its own, a reversal signal, and a price cross through a flat average is the classic whipsaw.

Dynamic Support and Resistance

Like any widely watched average, ALMA can act as dynamic support or resistance: pullbacks in an uptrend often stall near it and the trend resumes, and rallies in a downtrend often fade there. The honest caveats apply. The reaction is a tendency rather than a rule, it is weaker for an average few participants watch (ALMA is far less standard than the 20 EMA or 50 SMA), and a stall near the average is a location for a trade, not the trade itself. The entry still needs a rejection candle or a structure break, and the stop belongs beyond the reaction low rather than at the average.

Crossovers and Price Crosses

Price crossing the average is the simplest trend-change trigger and the most whipsaw-prone. A two-average crossover, a faster ALMA against a slower one, produces later entries and fewer false starts, and ALMA's offset and sigma let the same crossover be re-tuned per market instead of switching average types. Whichever version you trade, read it against the regime: crossover rules earn their return in sustained trends and give much of it back in ranges, and no weighting scheme changes that arithmetic. The Library's page also notes a use that is easy to miss: as a smoother for non-price series such as oscillator outputs, volume or spreads, where Gaussian-shaped weighting is a standard noise-reduction choice borrowed from signal processing.

A Worked Price-Cross Trade

Consider a hypothetical stock on a daily chart, a $25,000 account and a 1% risk budget of $250. The rule is a long when price closes above a rising ALMA (20, 0.85, 6) after a pullback that held above the prior swing low, with the stop below that swing low and a target at 2R. See Risking It Right for the budgeting logic.

StepCalculationResult before costs
EntryClose above the rising ALMA after the pullbackBuy $52.40
Stop below the swing low$51.10 swing low minus a $0.20 allowanceStop $50.90; $1.50 risk per share
Position size$250 ÷ $1.50, rounded down166 shares; $249.00 planned risk; $8,698 notional
TargetEntry plus 2 × $1.50$55.40; $3.00 reward, 2.0R
Gap through the stop, fill at $50.30166 × ($52.40 − $50.30)$348.60 loss, about 1.4R; a stop level is not a guaranteed fill
Range-day sequenceThree whipsaw exits at −0.6R, then one 2R trend tradeNet +0.2R over four trades; the trend trade pays for the range

The average supplied the direction and the trigger, the swing low supplied the stop and the stop distance supplied the size. The last row is the part most write-ups omit: a moving-average rule's return comes from a few trend trades that outweigh many small whipsaws, so the trade count and the drawdown between trends matter more than the win rate.

ALMA on Quant Charts

The Native Moving Average with ALMA Type

The Library's Moving Average is a single configurable average with a type selector covering SMA (default), EMA, WMA, RMA, HMA, ALMA, VWMA, DEMA, TEMA, KAMA, LSMA, McGinley Dynamic and Hamming, each following its standard published formula with no added logic. Choose the ALMA type and two extra inputs appear: ALMA Offset (default 0.85) and ALMA Sigma (default 6), with MA 1 Length (default 20) and Source (default close) shared across types. Enable Show MA 2 for a second average (default SMA 50) and the two-average crossover. Four alerts cover the common rules: Price Cross Above MA 1, Price Cross Below MA 1, MA 1 Cross Above MA 2 and MA 1 Cross Below MA 2, and the crossover alerts evaluate even while the second plot is hidden. The source is published on the page, so the Gaussian weights can be read line by line.

ToolWhat it addsWhere it runs
Moving Average (ALMA type)ALMA with Offset and Sigma inputs, optional second average, price-cross and MA-cross alertsQuant Charts, from the Library page
Moving Average (other types)SMA, EMA, WMA, HMA, KAMA and more for side-by-side comparison on the same chartQuant Charts, from the Library page
Average True RangeA volatility measure for stop distances behind an ALMA entryQuant Charts, from the Library page
Support and Resistance Levels with BreaksSwing-based levels that give a pullback to the average a structural stopQuant Charts, from the Library page
Signals & Overlays, Price Action Concepts, Oscillator MatrixLuxAlgo toolkits with their own signal, structure and momentum logicTradingView; none of them is built on ALMA

Testing ALMA Against the Alternatives with Quant

Write the rule completely: the average type and its three inputs, the entry condition (price cross, two-average cross or pullback to a rising average), the confirmation bar, the stop, the target and the position sizing. Describe it to Quant, inspect the Code to confirm the weights use the offset and sigma you intended and that signals are evaluated on closed bars, and click Run. The Making Strategies with Quant guide shows the workflow, and the native backtest guide explains the Backtest Summary: net profit, trade count, win rate, maximum drawdown and profit factor, with commission and slippage set in the strategy properties.

Adding indicators in Quant Charts. Two copies of the Moving Average, one set to ALMA and one to EMA at the same length, show the lag and noise difference directly on the chart.

Three comparisons are worth running. The same crossover rule with ALMA, EMA and HMA at the same length, to see whether the weighting scheme changes the result or only the timing at the margin. The default offset of 0.85 against 0.5 and 0.95, to see how much of the return depends on where the bell sits, and whether neighbouring values give similar results, which is the parameter-stability check that guards against curve-fitting three dials. And the rule with and without a regime filter that stands aside in ranges, since that is where every moving-average rule loses. Read trade count and maximum drawdown before headline return, and hold out data the parameters never saw. LuxAlgo's Signals & Overlays, Price Action Concepts and Oscillator Matrix toolkits run on TradingView with their own calculations; none of them is built on ALMA, and a toolkit signal near an ALMA cross is confluence to test rather than confirmation. The legacy Backtesting Assistant is a separate product with its own workflow and is not needed for these tests, and no LuxAlgo tool places orders at a broker.

Conclusion

ALMA is a well-designed smoother: a Gaussian window with its peak slid toward the present, giving less lag than a simple average and less noise than an exponential one at comparable settings, with two dials that let you choose the balance. Read it for what it is, a different weighting scheme with more control, rather than for what it is sometimes sold as, a lag-free average. It still confirms turns after they begin, still whipsaws in ranges, and the three parameters are three chances to fit the past. Used as a steadier trend filter and slope gate, with structure supplying the stop and a test supplying the settings, it earns its place in the moving-average lineage.

Key Takeaways

  • Gaussian weights, shifted peak. m = offset × (N − 1), s = N ÷ sigma, weights exp(−(i − m)² ÷ 2s²); defaults 9, 0.85, 6.
  • Offset is the speed dial, sigma the width dial. Larger sigma means a narrower bell, not a wider one.
  • Not an upgrade, a trade-off. Less lag than an SMA and less noise than an EMA at comparable settings; still lags turns and whipsaws in ranges.
  • More dials, more curve-fit risk. Check neighbouring parameter values before trusting any result.
  • Native and testable. The Moving Average indicator's ALMA type opens on Quant Charts with cross alerts, and Quant can test ALMA against EMA and HMA under the same rule.

FAQs

What are the default ALMA settings?

Legoux's original release used a window of 9, an offset of 0.85 and a sigma of 6, and those remain the defaults on major platforms and in the Library's Moving Average indicator. The window sets the number of bars, the offset places the weight peak at 85% of the way toward the newest bar, and sigma 6 gives the bell a standard deviation of 1.5 bars in a 9-bar window.

What do offset and sigma control in ALMA?

Offset positions the peak of the weight bell inside the window: values near 1 emphasise the newest bars, making the average faster and less smooth, while values toward 0.5 centre the bell, making it smoother and laggier. Sigma sets the bell's width relative to the window length: larger sigma concentrates weight tightly around the peak, smaller sigma spreads it out toward a simple average.

Is ALMA better than an EMA or SMA?

It is not a strict upgrade. For a given amount of smoothing ALMA often shows less lag than an SMA and less noise than an EMA, and its two extra dials let the balance be tuned without changing average type. It still lags real turns and still whipsaws in ranges, and the extra parameters add curve-fitting risk.

Does ALMA repaint?

A standard ALMA does not. It is computed from the current bar and the previous N − 1 bars only, so once a bar closes its value is fixed; like any indicator, the value on the live bar moves until that bar closes. Only centred or forward-shifted variants that reference future bars repaint.

Is ALMA an adaptive moving average?

No. Its window length is fixed rather than condition-driven, so it does not speed up or slow down with volatility the way KAMA or other adaptive-lookback averages do. Its responsiveness is set by where the offset places the bell, not by market state.

Can I use and backtest ALMA on Quant Charts?

Yes. Open the Moving Average indicator from the Library with Open on Quant Charts, set MA 1 Type to ALMA and adjust ALMA Offset and ALMA Sigma; enable Show MA 2 for a crossover with price-cross and MA-cross alerts. To test a rule, describe the inputs, entry, stop, target and sizing to Quant, inspect the Code and click Run, then compare ALMA with EMA and HMA under the same rule.

References

LuxAlgo Resources

External Resources

Learn to trade smarter.

Market analysis and techniques that build your edge, one email a week.

Don’t worry, no spam here. See our privacy policy for more info.

Jacob Denbrock
Jacob Denbrock

CCO at LuxAlgo. 20 years of content creation experience, Jacob runs LuxAlgo's content team, brand growth, and hosts live shows showcasing his expertise in trading & LuxAlgo tools.

Read next