What is ALMA?
The Arnaud Legoux moving average weights the closes in its window along a bell curve. The Offset setting slides the peak of that curve along the window, towards the newest bars or towards the middle, and Sigma sets how narrow the curve is. With the defaults, most of the weight falls on the few most recent bars without resting entirely on the newest one, which gives a line that is smooth but stays close to price.
ALMA smooths price to help identify trend direction. It does not confirm trend strength or predict future prices, and it always uses the close: there is no price source setting.
How to use ALMA
- Price above or below the line. Price holding above ALMA is read as context for an uptrend, below it for a downtrend.
- The slope. A rising line means the bars carrying the most weight are above the older ones. A flattening line usually means the move has stalled.
- A fast and a slow ALMA crossing. Two ALMAs with different lengths give a fast and a slow line; a crossing marks the recent window overtaking the longer one.
- Offset and sigma together. Moving the peak towards the newest bars and narrowing the curve makes the line quicker and noisier. Moving it back and widening the curve makes it smoother and later.
These are ways to read the line, not entry signals on their own.
Settings
| Setting | Default | What it changes |
|---|---|---|
| Length | 9 | Bars in the window. Lower follows price more closely; higher is smoother and later. Minimum 1. |
| Offset | 0.85 | Where the peak of the bell curve sits in the window, as a fraction of its length: 0 is the oldest bar, 1 the newest. Higher values put more weight on recent bars and make the line more responsive; lower values move the weight back and make it smoother and later. Values between 0 and 1 are the meaningful range. |
| Sigma | 6 | How narrow the bell curve is. Higher values concentrate the weight on fewer bars around the peak, so the line follows them more sharply; lower values spread it across more of the window and smooth more. |
The indicator always averages the close. Adjust length, offset and sigma in the indicator settings.
Calculation
Each close in the window gets a weight from a bell curve centred at the offset point. The weighted closes are summed and divided by the total weight:
m = offset * (length - 1) (0.85 * 8 = 6.8 at the defaults)
s = length / sigma (9 / 6 = 1.5 at the defaults)
for each bar i in the window, i = 0 oldest ... length - 1 newest:
weight[i] = exp( -(i - m)^2 / (2 * s^2) )
ALMA = sum(weight[i] * close[i]) / sum(weight[i])
At the defaults the curve peaks at position 6.8 of 0 to 8, a little over one bar back from the newest close. The newest close still carries a large weight, while the oldest bars in the window carry almost none. A narrow, recent peak is what lets the line stay close to price without passing the newest bar's noise straight through.
The weights depend only on the three settings, so they are the same on every bar. The first value appears once a full window is available, on the ninth bar with the default length.
Limitations
- It still lags. Putting the weight near the newest bars reduces delay but does not remove it.
- Three settings interact. Length, offset and sigma all change the shape of the weights, which makes it easy to tune the line to fit past prices rather than to find a setting that holds up.
- Close only. The average is always computed on the close, so it cannot be applied to hl2, hlc3 or another price.
- It depends on timeframe and settings. The same indicator gives a different line on 15m than on 1D.
- It is not a strategy. On its own it carries no risk management, sizing or exit.
Frequently asked questions
ALMA is a moving average that weights the closes in its window with a bell-shaped curve. An offset moves the peak of the curve along the window and a sigma sets its width, so the same indicator can be made smoother or more responsive.
Offset places the peak of the weights, from 0 at the oldest bar in the window to 1 at the newest. Sigma sets how tightly the weights cluster around that peak; a larger sigma gives a narrower curve. The defaults, 0.85 and 6, put most of the weight on the last few bars.
Yes. The indicator has three inputs: Length, default 9 with a minimum of 1; Offset, default 0.85; and Sigma, default 6. Open the indicator's settings on the chart to change them. There is no source input: ALMA is always calculated on the close.
Start from the defaults and change one setting at a time. Lengthen the window for a smoother line, lower the offset to move weight away from the newest bars, or lower sigma to spread it more evenly. Test any change on the timeframe you trade rather than tuning it to past moves.
No. Each value depends only on the closes in its window, with fixed weights, so values on closed bars are not revised. The current candle's value moves while that candle is live and settles when it closes.
Use the Add to chart button at the top of this page. It opens BTC/USDT on Binance in the Altrady Charts terminal with the built-in Arnaud Legoux Moving Average already applied. On any other market, open the indicator picker on the chart and choose Arnaud Legoux Moving Average from the Moving Average group.