Skip to content
On this page
  1. Key Takeaways
  2. What It Is
  3. The Intuition
  4. How It Works
  5. Worked Example
  6. Common Mistakes
  7. Frequently Asked Questions
  8. Sources
  9. Disclaimer
← All concepts
Technical AnalysisAdvanced5 min read

ALMA: Arnaud Legoux Gaussian Moving Average

The ALMA Arnaud Legoux moving average is a Gaussian-weighted smoother published by Arnaud Legoux and Dimitrios Kouzis-Loukas. It uses a bell-shaped weighting curve placed inside the lookback window, with two tunable parameters (offset and sigma) that let the trader trade off responsiveness for smoothness.

Key Takeaways

  • ALMA Arnaud Legoux moving average applies a Gaussian distribution of weights across the lookback window, not a linear or exponential ramp.
  • The offset parameter (0 to 1, default 0.85) shifts the peak weight toward the most recent bar; sigma (default 6) controls how wide the bell is.
  • The most common mistake is treating ALMA defaults as universal; both offset and sigma need to match the instrument and timeframe.
  • ALMA aims to reduce lag without amplifying noise, occupying a niche between HMA-style fast smoothers and standard EMAs.

Key Takeaways

  • ALMA Arnaud Legoux moving average applies a Gaussian distribution of weights across the lookback window, not a linear or exponential ramp.
  • The offset parameter (0 to 1, default 0.85) shifts the peak weight toward the most recent bar; sigma (default 6) controls how wide the bell is.
  • The most common mistake is treating ALMA defaults as universal; both offset and sigma need to match the instrument and timeframe.
  • ALMA aims to reduce lag without amplifying noise, occupying a niche between HMA-style fast smoothers and standard EMAs.

What It Is

ALMA is a moving average that weights observations inside its window with a Gaussian (normal) curve. The peak of the curve sits near the most recent price (controlled by offset), and the width of the curve is set by sigma. The output is the weighted sum divided by the sum of weights, in the same shape as any other normalized average.

The indicator was designed to attack two problems at once: lag and noise. A standard EMA reduces noise but lags. A short EMA cuts lag but adds noise. ALMA's tunable offset and sigma let a chartist pick a point along that tradeoff rather than living with a single fixed compromise.

The Intuition

Picture a 20-bar window. An SMA places equal weight on every bar. An EMA places exponentially decaying weight that extends out into history. ALMA places a bell curve over the bars in the window. You decide where the peak of the bell sits and how spread out it is.

If the peak sits at the most recent bar (offset = 1), ALMA reacts very fast but admits more noise. If the peak sits in the middle of the window (offset = 0.5), ALMA is centered and smoother but lags more. Sigma plays the same role as the bandwidth of a kernel: small sigma concentrates the weight, large sigma spreads it.

How It Works

The standard formulation, as documented by TradingView, TrendSpider, and the Stock Indicators reference, is:

m = offset * (N - 1)
s = N / sigma

weight(i) = exp( -((i - m)^2) / (2 * s^2) )
ALMA      = sum( price(i) * weight(i) ) / sum( weight(i) )

Where i runs from 0 to N-1 across the lookback window. The Gaussian function exp(-(x-m)^2 / 2s^2) is the unnormalized normal density, which is why the divisor is the sum of the weights rather than a fixed constant.

Default parameters published by Legoux and used by most platforms:

  • N (window): 9 bars on intraday and short-term setups.
  • offset: 0.85 (peak weight on the bar 85 percent through the window, near the most recent bar but not exactly on it).
  • sigma: 6 (a moderately wide bell; smaller values sharpen the curve).

The defaults make ALMA behave roughly like a fast EMA with cleaner peaks. Setting offset closer to 1 turns it into something close to a short WMA; setting it near 0.5 produces a centered, very smooth line that lags more.

Worked Example

Take a 9-period ALMA with offset 0.85 and sigma 6. Compute m and s:

m = 0.85 * (9 - 1) = 6.8
s = 9 / 6 = 1.5

For each i from 0 to 8, the weight is exp(-((i - 6.8)^2) / (2 * 1.5^2)) = exp(-((i - 6.8)^2) / 4.5). A few values:

  • i = 0 (oldest): exp(-46.24/4.5) = exp(-10.28) ~ 0.0000
  • i = 5: exp(-3.24/4.5) = exp(-0.72) ~ 0.487
  • i = 7: exp(-0.04/4.5) ~ 0.991
  • i = 8 (newest): exp(-1.44/4.5) = exp(-0.32) ~ 0.726

So the heaviest weight falls on bar i = 7, the second-most-recent close. The newest bar still carries significant weight but not the most. That offset of 0.85 is what gives ALMA its blend of responsiveness and smoothness.

Multiply each weight by its price, sum, and divide by the sum of weights. On a steadily rising series ALMA will print between the most recent close and a short-window WMA.

Common Mistakes

  1. Using defaults blindly. A 9-bar ALMA with offset 0.85 and sigma 6 works well on liquid intraday charts. On weekly data or volatile thin names, those values can produce either too much lag or too much noise. Re-tune for each instrument and timeframe.

  2. Treating ALMA as predictive. ALMA reduces lag versus an EMA, but it does not see the future. It still uses only past prices. Vendors that label ALMA as "leading" are overselling.

  3. Confusing offset with phase shift. Offset controls where the Gaussian peak sits within the window. It does not actually shift the line forward in time. Pulling offset to 1 just adds more weight to the newest bar, with the noise that follows.

  4. Comparing ALMA crosses to EMA crosses without tuning. Different parameter sets produce different cross frequencies. A backtest of ALMA-vs-EMA on default values is not a fair comparison if either is mis-tuned.

  5. Stacking ALMAs as a ribbon. A ribbon of ten ALMAs at different offsets looks busy and adds little. Two well-chosen ALMAs almost always beat a forest of them.

Frequently Asked Questions

What is ALMA Arnaud Legoux moving average in simple terms? The ALMA Arnaud Legoux moving average is a moving average that uses a bell-shaped weighting curve inside its window. It balances lag and smoothness via two user controls.

How does ALMA affect investment decisions? Swing and intraday traders use ALMA in place of EMAs when they want a cleaner signal without sacrificing too much responsiveness. The tunable parameters allow adaptation per market and timeframe.

What is a real-world example of ALMA use? ALMA is a built-in indicator in TradingView, TrendSpider, and ProRealTime, and frequently appears in Pine Script strategies. Many short-term equity templates default to 9 bars, offset 0.85, sigma 6.

How can investors use ALMA effectively? Pick the window N for your horizon, then tune offset for responsiveness and sigma for smoothness on the specific instrument. Pair the line with a volatility filter to avoid chop.

How is ALMA different from HMA? HMA uses nested WMAs with square-root smoothing and no tunable shape parameter beyond length. ALMA uses a single Gaussian weighting with offset and sigma controls that the user can adjust.

Sources

  1. TradingView Help. "Arnaud Legoux Moving Average." https://www.tradingview.com/support/solutions/43000594683-arnaud-legoux-moving-average/
  2. TrendSpider Knowledge Base. "Arnaud Legoux Moving Average (ALMA)." https://help.trendspider.com/kb/indicators/arnaud-legoux-moving-average-alma
  3. Stock Indicators for .NET. "Arnaud Legoux Moving Average (ALMA)." https://dotnet.stockindicators.dev/indicators/Alma/
  4. TradingCode. "Pine Script's Arnaud Legoux Average." https://www.tradingcode.net/tradingview/arnaud-legoux-average/

Disclaimer

This article is educational content only and is not financial advice. Nothing here is a recommendation to buy, sell, or hold any security. Consult a licensed advisor before making investment decisions.

RELATED CONCEPTS
The IWP Substack

You understand the concept. Now see it applied.

The Investing With Purpose Substack turns ideas like this into research and risk-managed trade plans on real stocks, updated every week.

Read on Substack (opens in a new tab)

Related concepts