What is KAMA?
The Kaufman Adaptive Moving Average is an exponential-style average whose speed changes from bar to bar. It measures how efficiently price has moved over the last few bars, the net distance travelled compared with the total distance travelled. When price runs cleanly in one direction the line tracks it closely; when price chops back and forth the line nearly flattens. The aim is one line that is fast in a trend and slow in a range.
KAMA adapts its smoothing to how directional recent price has been. It does not tell you which way the next move will go, and a flat line in a range is a sign of noise, not a support level.
How to use KAMA
- A flat line. The line going flat means recent price movement has been mostly back and forth, with little net progress. This is the range condition the indicator is built to ignore.
- A line that starts to slope. When the line lifts away from flat, price has begun moving more efficiently in one direction and the average is speeding up to follow it.
- Price above or below the line. Price holding above a rising line is read as context for an uptrend, below a falling line for a downtrend.
- The three lengths. Length sets the window used to judge efficiency. Fast Length and Slow Length set the quickest and slowest the average is allowed to move.
These are ways to read the line, not entry signals on their own.
Settings
| Setting | Default | What it changes |
|---|---|---|
| Length | 10 | Bars used to measure the efficiency ratio. Shorter reacts to changes in character sooner but is noisier. Minimum 1. |
| Fast Length | 2 | The EMA length the line behaves like in a perfectly clean trend. Lower lets it track price more tightly. Minimum 1. |
| Slow Length | 30 | The EMA length the line approaches in pure chop. Higher makes it stall more completely in a range. Minimum 1. |
| Source | Close | Which price each bar contributes. Open, high, low and the averaged sources such as hl2 and hlc3 are also available. |
Adjust the efficiency window, the fast and slow limits and the price source in the indicator settings.
Calculation
First the efficiency ratio compares the net move over the window with the total bar-to-bar movement. That ratio then sets the smoothing constant used for this bar:
ER = abs(price - price 10 bars ago) / sum of abs(bar-to-bar change) over 10 bars
fast = 2 / (2 + 1) = 0.667
slow = 2 / (30 + 1) = 0.065
SC = (ER * (fast - slow) + slow) ^ 2
KAMA = previous KAMA + SC * (price - previous KAMA)
An efficiency ratio of 1 means every bar moved the same way; near 0 means the bars mostly cancelled out. The smoothing constant is squared, so with the defaults it ranges from about 0.444 in a perfectly clean run to about 0.004 in pure chop. In chop the line therefore moves less than half a percent of the way towards price each bar.
Two edge cases are handled explicitly. If price did not move at all across the window, the ratio would divide by zero, so a ratio of 1 is used instead. And the first value has no previous KAMA to start from, so it is simply the current price. With a length of 10, the first value appears once 10 earlier bars are available.
Limitations
- It still lags. Even at full speed it behaves like a short EMA, and it has to see a run of efficient bars before it speeds up, so the start of a trend is always behind it.
- A sharp reversal can look inefficient. A V-shaped turn inside the window cancels out in the net move, so the line may slow down just as a new direction begins.
- The settings interact. Length, Fast Length and Slow Length all change how the line behaves, which makes it easy to over-fit them to past data.
- The live candle moves. The current bar's value changes until that bar closes.
- It is not a strategy. On its own it carries no risk management, sizing or exit.
Frequently asked questions
It is a moving average that changes its own speed. It compares the net move over a window with the total movement in that window. When price moves efficiently in one direction the average follows closely; when price chops it barely moves.
An EMA moves the same fraction of the way towards price every bar. KAMA recalculates that fraction every bar from the efficiency ratio, between the speed of a 2-period EMA and a 30-period EMA by default, and squares it, so in a range it can be far slower than either.
Yes. The indicator declares four inputs: Length, default 10; Fast Length, default 2; Slow Length, default 30; and Source, default close. Each length has a minimum of 1. Open the indicator's settings on the chart to change them.
No. Values on closed bars are not revised. The current candle's value moves while that candle is still live and settles when it closes. Because each value builds on the one before, loading older history starts the line from a different first bar and values near the start of the loaded range can shift.
That is the design. In a range the bars mostly cancel out, so the efficiency ratio is close to zero and the smoothing constant falls towards the square of the slow alpha, about 0.004 with the defaults.
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 Moving Average Adaptive already applied. On any other market, open the indicator picker on the chart and choose Moving Average Adaptive from the Moving Average group.