Camovia Tray™

Adaptive Moving Average (KAMA)

AMA is the moving average that shifts its own gears: crawling through ranges (noise-proof) and accelerating automatically when a trend appears — the efficiency ratio is its throttle.

What it is

The Adaptive Moving Average (AMA/KAMA) by Perry Kaufman adjusts its smoothing speed dynamically via the Efficiency Ratio (ER): ER = directional displacement ÷ total path — a one-way market drives ER toward 1 (efficient), chop drives it toward 0. AMA interpolates its smoothing constant between the fast end (2-period) and slow end (30-period) by ER: in trends it hugs the fast end and reacts sharply; in ranges it degrades to the slow end and barely moves — one average automatically switching between two regimes.

Origin

AMA was published by veteran quant Perry Kaufman in "New Trading Systems and Methods" (introduced 1995, refined in "Trading Systems and Methods", 1998). Kaufman's motive was the fundamental dilemma of all MA systems: fast averages signal early but whipsaw, slow ones are steady but late — rather than hand-tuning parameters, let the average adapt itself. MT5 ships iAMA with defaults 9/2/30 (ER window / fast / slow).

Download Camovia Tray free — check quotes, manage positions, and hide in one click from your system tray.

Download Free

The formula

Three steps (MT5 defaults 9/2/30):

ER = |Close − Close(9)| ÷ Σ|Close − Close(1)| (9-bar displacement ÷ path)
SC = [ER × (2÷(2+1) − 2÷(30+1)) + 2÷(30+1)]² (smoothing-constant interpolation)
AMA = AMA(prev) + SC × (Close − AMA(prev))

The fast end is SC = 2/3 (equivalent to a 2-period EMA), the slow end SC = 2/31 (equivalent to 30). ER chooses the interpolation point: ranges (ER ≈ 0) sit at the slow end, one-way moves (ER ≈ 1) at the fast end. Kaufman's squaring dampens the mid-efficiency zone, stabilizing "half-trend" markets.

Worked example

A controlled comparison of "adaptive" in action:

  1. Two weeks of chop: price bounces in a 2% box — 9-bar displacement ≈ 0.5 over a path of ≈ 6 → ER ≈ 0.08 → AMA smooths at near-30 speed: the line is flat and ignores the noise entirely.
  2. Breakout: price rallies 8% in five one-way days → ER surges past 0.7 → the smoothing constant races toward the 2-period end: the line steepens and follows almost immediately.
  3. Mid-trend pullback: ER falls to 0.4 → AMA slows — the pullback merely decelerates the line without flipping it.

With the same parameters (9/2/30), AMA behaves like a 30-period slow line in ranges and a 2-period fast line in trends — parameter-tuning has been internalized into the indicator. That is the whole meaning of "adaptive".

How to read it

Reading AMA (same structure as any MA, but faster):

Range Common interpretation
AMA rising, price above An uptrend — AMA hugs price; touches of the AMA are trend-side references
AMA falling, price below A downtrend — mirrored
AMA flat Low ER = a range — the indicator itself is telling you trend strategies are off
Price crossing AMA A trend-switch signal — earlier than a fixed average of similar period (faster in trends)
AMA slope turning up Rising ER = rising efficiency — the early signature of a new trend

AMA's unique read is the slope: flat-to-steep = a trend being born; steep-to-flat = exhaustion. The slope itself can be smoothed or momentum-transformed (Kaufman suggests the ROC of AMA for direction confirmation).

Common signals & usage

Cross with efficiency (trend regime)

Crosses while ER > 0.4 (a trend already exists) — high-efficiency crosses are trustworthy; ignore crosses at low ER.

Slope inflection

AMA turning from flat to steep (ER breaking threshold) — a trend-formation signal; steep-to-flat — exhaustion.

Trend pullback entry

In a strong trend (steep rising AMA), price retesting the AMA and holding — the adaptive version of the MA5-pullback buy, with less noise.

Dual-AMA cross

A fast AMA (e.g. 4/2/30) crossing a slow AMA (e.g. 20/2/60) — the adaptive golden cross, lagging far less than fixed-parameter pairs.

Limitations & common mistakes

  • The parameter system still matters: 9/2/30 control the observation window, the fast end and the slow end — retuning one breaks the adaptive balance; keep defaults until you understand the mechanics.
  • It still lags before trends exist: ER needs a bar or two to accumulate — the first bar of a V-reversal finds AMA still slow (it cannot know the turn happened).
  • "Adaptive" is not "no lag": mid-trend AMA hugs price, but the range-to-trend transition always arrives half a beat late — the fate of every average; AMA merely shrinks it.
  • Family confusion with FRAMA/VIDYA: all are adaptive MAs (fractal-dimension / volatility regulated) — different mechanisms, different values; check conventions when comparing.
  • High-ER fakes: one news-spike bar can push ER up — AMA accelerates into it and gives it back; filter event bars with ATR.

AMA in MT5

AMA is a built-in MT5 trend indicator (single line on the main chart). The MQL5 function for programmatic use is iAMA:

int iAMA(string symbol, ENUM_TIMEFRAMES period, int ama_period, int fast_ma_period, int slow_ma_period, int ama_shift, ENUM_APPLIED_PRICE applied_price);
MQL5 function iAMA()
Default parameters ama_period=9, fast=2, slow=30
Buffers 0=main AMA line
Algorithm ER-interpolated smoothing constant + recursive AMA
Display window Main chart overlay

The three period parameters are independent: ama_period is the ER window; fast/slow are the two ends of the smoothing interpolation (2- and 30-period EMA equivalents). Single buffer — the slope must be differenced in code.

Behavior across timeframes

15-minute

ER jitters and the line accelerates often — take signals only where AMA's slope agrees with the larger timeframe

1-hour / 4-hour

The main swing trend-following period: crosses and pullback entries combine best here

Daily

Kaufman's native habitat: the daily slope inflection carries the most value for mid-term trend switches

Weekly

A weekly flat-to-steep switch is rare and heavyweight — the signal of a long-term trend restarting

Indicator combinations

Common pairings for AMA:

  • With ADX: ADX > 25 (trend) → AMA at full speed; ADX < 20 (range) → AMA self-slows — the two regime calls verify each other. ADX
  • With ATR: AMA direction + 2×ATR stops — the complete trend-following loop (Kaufman's standard risk kit). ATR
  • With MACD: AMA sets trend direction, MACD crosses set the rhythm — clean division of fast and slow duties. MACD

FAQ

Q What do the 9/2/30 parameters mean?

9 = the ER observation window (displacement ÷ path over those 9 bars); 2 = the adaptive fast end (a 2-period EMA-equivalent smoothing constant); 30 = the slow end (30-period equivalent). ER interpolates the actual constant between the two ends — each parameter has its own job; keep defaults at first.

Q How is AMA different from a plain EMA?

An EMA's smoothing constant is fixed — always equally fast or slow; AMA's constant is dynamically regulated by the efficiency ratio — near a 30-period EMA in ranges (noise-proof) and near a 2-period EMA in one-way trends (lag-shrunk). Think of it as "an EMA that shifts its own gears".

Q How do I read the efficiency ratio (ER)?

ER = 9-bar net displacement ÷ the sum of 9 one-bar moves: one-way trends drive ER → 1 (the road all became progress), boxes drive it → 0 (every step retraced). ER is itself a regime detector: > 0.4 ≈ trend, < 0.2 ≈ range — thresholds tuned per instrument.

Q Does AMA lag at trend reversals?

Yes, but less than fixed slow averages: at the reversal's start ER is still low (the move is not yet one-way) so AMA stays slow — the launch of a V-reversal necessarily lags; once ER climbs (a bar or two later) AMA accelerates after it. Inherent to the adaptive mechanism, not a defect.

Q How do I add AMA in MT5?

Menu: Insert → Indicators → Trend → Adaptive Moving Average, or drag it from the Navigator onto the main chart. Parameters 9/2/30 (ER window/fast/slow) plus applied price — keep defaults to experience Kaufman's original behavior.

Turn MT5 / MT4 into a Tray Tool

Check quotes, manage positions, and hide in one click.

Download Camovia Tray

This page is educational content about a technical indicator. It is not investment advice. Indicator signals can and do fail — always combine them with your own risk management.