TL;DR. The last n values averaged with weights shaped like a bell curve. The bell sits near the newest end of the window (the offset), and its width is set by sigma, so the line is smooth like a long average and turns nearly as early as a short one.
What it measures
- Trend with low lag and little noise. The heaviest weights sit a little behind the newest bar, not on it, which smooths away single-bar spikes while keeping the line close to price.
- A tunable trade-off. The offset moves the bell toward the newest bar (faster) or the middle of the window (smoother); sigma narrows the bell (fewer bars count) or widens it.
- A fixed window. Like a WMA, nothing older than n bars counts at all.
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Period | 9 | 1 to 500 | Bars the bell spans. |
| Sigma | 6 | 0.1 to 50 | How sharp the bell is. Higher concentrates the weight on fewer bars around its centre; lower spreads it toward a plain average. |
| Offset | 0.85 | 0 to 1 | Where the bell is centred: 0 is the oldest bar, 1 the newest. Higher reacts faster, lower is smoother. |
| Source | Close | Close, Open, High, Low, HL2, HLC3, OHLC4 | Which value of each bar is averaged. HL2 is (high + low) / 2, HLC3 adds the close and divides by 3, OHLC4 averages all four. |
Recommended settings
- 9, 6, 0.85 (the default): A fast, smooth line for intraday entries.
- 21 to 50, 6, 0.85: A trend line on 5 to 15 minute bars.
- Offset 0.5 with a low sigma (2 to 3): A wide bell centred on the window, a smooth, slow filter that trails price by about half the period, as an SMA does.
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| ALMA | Numeric | Always | The bell-weighted average in price units, drawn over the candles. Comparable directly to price and to any other average. |
How to read it
- Price above a rising ALMA: an up state for this window.
- Price below a falling ALMA: the mirror, a down state.
- ALMA turning: the bars under the bell's peak have changed direction. With the default offset that is the bars two or so back, so a turn shows quickly without reacting to the last bar alone.
- Two ALMAs of different periods: their cross marks a turn with less delay than the same pair of SMAs.
Best in, worst in
Best in trends with noisy bars, where a short average whipsaws and a long one is late.
Worst in sideways markets: a low-lag line still crosses price over and over in a range. Pair it with a trend filter or wire Re-arm when on the Entry.
Three setups
1. Fast ALMA over slow ALMA
Add an ALMA(9) and an ALMA(30) and a Crossover node reading them: fast above slow for longs, below for shorts. One trade per turn, with less delay than an SMA pair.
2. ALMA as a trend filter
Compare price with an ALMA(50) through a Comparison node and AND it into another entry: longs only above the line, shorts only below it.
3. Pullback to the ALMA
In an uptrend (ALMA(21) above its value a few bars ago, through a Bars Ago modifier), enter long when price dips to within one ATR of the line, with a stop below it through Set Stop Loss.
Common mistakes
- Sweeping all three settings at once. Period, sigma and offset together make a large grid that will find something by chance. Fix sigma and offset at the defaults and sweep the period first (overfitting in trading).
- Comparing with another platform's ALMA without checking the direction. Some libraries apply the bell reversed, peaking on the oldest bar. AlgoLift's peaks toward the newest, as Legoux's does.
- A sigma so small the bell is flat. At low sigma every bar weighs nearly the same and the line becomes an SMA.
An ALMA weights its window with a bell placed near the newest bar: the offset sets how fast, sigma how smooth.