Moving averages

KAMA Indicator on a Live Gold Chart

KAMA is a moving average that changes how fast it follows price. When price travels in a straight line it speeds up, and when price goes back and forth it slows to a crawl. Watch it on the gold chart below in sideways stretches, where it goes nearly flat.

Loading the live chart.

Close
–
KAMA
–

Open the gold chart

What it shows

KAMA draws a single line and nothing else. It first appears after Length candles, because it needs that much history to judge how straight the move has been.

How Pravex works it out

  1. Efficiency: take the distance between the source now and the source Length candles ago, as a positive number. Divide it by the total of every single-candle move over those same candles, also positive. A perfectly straight move gives 1, a lot of back and forth gives a number near 0, and a flat stretch gives 0.
  2. Turn the two lengths into speeds: fast = 2 ÷ (Quickest pace + 1) and slow = 2 ÷ (Slowest pace + 1). With the defaults 2 and 30 that is about 0.667 and 0.065.
  3. Blend them by efficiency: q = efficiency × (fast − slow) + slow, then square it to get this candle’s alpha. Efficiency 0 gives an alpha near 0.004, efficiency 1 gives about 0.44.
  4. New KAMA = alpha × source + (1 − alpha) × previous KAMA. The first value uses the source itself as its starting point.

Settings

SettingDefaultWhat changing it does
Length14How many candles the efficiency check looks back over. A longer Length judges the trend over more history and reacts to a change in character later.
Quickest pace2Sets the quickest the line can ever move. Raising it slows the line even in a perfectly straight run.
Slowest pace30Sets the slowest the line can move. Raising it makes the line stiffer in choppy stretches.
SourcecloseThe price used for the efficiency distances and for the average itself. Efficiency compares net travel with total travel, so a wicky source such as hl2 adds back-and-forth and slows KAMA a touch.

How traders read it

Read as a trend line, KAMA works like the others: price above a rising KAMA says the move up is holding; price under a falling one says the move down is. The difference is in the quiet stretches, where the line goes almost flat instead of wobbling along with every candle.

A flat KAMA with price crossing it back and forth is a useful picture of a market with no direction. When the line starts to tilt, the last few candles have been moving in one direction, and the line is already following them closely.

When it misleads

Efficiency looks only at the last Length candles. After a sharp reversal the old straight run still sits in that window, so the line can keep its speed for a few candles in the wrong direction. One huge candle dominates both the distance and the total, so efficiency jumps toward 1 and the line lurches toward price. In a long sideways range the line is so slow that it can miss the start of a breakout.

Questions and answers

What does KAMA stand for?

Kaufman’s Adaptive Moving Average. Adaptive means its speed is recalculated on every candle from how straight the recent move has been.

What do the quickest and slowest pace settings do in KAMA?

They set the two limits of the line’s speed. In a perfectly straight move it behaves like a 2-length average, and in a pure zigzag it behaves like a very slow 30-length one, each with the squared blend described above.

Why does KAMA go flat?

Over the last 14 candles price went back and forth without getting far, so efficiency is near 0 and alpha drops to about 0.004. The line then moves less than half a percent of the gap per candle, which is the point: it refuses to chase a range.

Why did KAMA keep going after gold reversed?

The straight run before the turn is still inside the 14-candle window, so efficiency stays high and the line keeps its speed. It slows only once enough back-and-forth candles replace that run.

Related: Moving Average Exponential, McGinley Dynamic, Hull Moving Average, Simple Moving Average, every indicator.

Not financial advice. Read our disclaimer.

Pro charts. Zero paywalls.

Charts for gold, oil, US indices and crypto, with every tool free to use.

Open the chart

No card, no trial, no upgrade pop-ups.