Back to Blog

Kaufman's Adaptive Moving Average (KAMA): TradingView Tutorial

Published: ·By Iven W.

Kaufman's Adaptive Moving Average (KAMA) is an adaptive trend-following moving average introduced by Perry J. Kaufman in 1995. Unlike a simple or exponential moving average — which use a fixed smoothing period — KAMA changes its smoothing speed based on the Efficiency Ratio (ER), a measure of directional price movement relative to noise. In clean trends, KAMA can follow price more closely; in choppy markets, it deliberately slows down to filter some of that noise. TradingView documents KAMA as a built-in indicator with inputs for source, ER length, fast length, slow length, and timeframe. The common starting point attributed to Kaufman by StockCharts is KAMA(10, 2, 30) — but like any indicator parameter, it should be tested on the specific instrument and timeframe you trade before use in live markets.

Not investment advice. All strategies and settings discussed here are for educational purposes only. Past behavior of an indicator on historical data does not guarantee future results. Always backtest and apply appropriate risk management before trading real capital.

Key Takeaways

  • KAMA adapts its smoothing speed every bar using the Efficiency Ratio (ER), which compares net directional change to total bar-to-bar movement.
  • The common Kaufman/ChartSchool starting point is KAMA(10, 2, 30) — ER length 10, fast length 2, slow length 30.
  • KAMA aims to reduce whipsaw signals in sideways markets by slowing down when ER is low; it does not eliminate false signals.
  • TradingView's built-in KAMA indicator requires no Pine Script or paid plan; confirm your account's current indicator limits in TradingView's help center.
  • Common strategies — crossovers, direction filter, dynamic support/resistance — should all be backtested before live use.

What Problem Does KAMA Address?

Traditional moving averages involve a fixed trade-off: a short period reacts quickly but gets whipsawed in sideways markets; a long period filters noise but lags behind turning points. Traders often switch parameters depending on whether the market is trending or ranging — an impractical approach in real time.

Perry Kaufman designed KAMA to adjust its own effective smoothing length based on a measurement of price efficiency. The result is a single line that aims to behave more like a fast average in trends and more like a slow average in congestion — reducing the need to manually switch parameters. Whether it achieves this in a specific market depends on conditions; backtest before relying on it.

How KAMA Works: The Three-Step Calculation

The following formulas are documented by TradingView's official KAMA help page and StockCharts ChartSchool.

Step 1 — Efficiency Ratio (ER)

The Efficiency Ratio measures how efficiently price moved in one direction relative to total bar-to-bar movement over the lookback period:

ComponentFormula
Change|Close − Close (N bars ago)|
VolatilitySum of |Close − Close (1 bar ago)| over N bars
ERChange ÷ Volatility

ER always falls between 0 and 1:

  • ER near 1 → Price moved cleanly in one direction with minimal noise. Efficient, directional trend.
  • ER near 0 → Price ended near where it started despite significant bar-to-bar activity. Choppy, directionless market.

The default ER length is 10 bars, meaning the indicator evaluates efficiency over the most recent 10 periods.

Step 2 — Smoothing Constant (SC)

KAMA interpolates between a fast and a slow smoothing constant, then squares the result:

Fast SC = 2 / (Fast Length + 1)
Slow SC = 2 / (Slow Length + 1)
SC = [ER × (Fast SC − Slow SC) + Slow SC]²

With fast = 2 and slow = 30:

  • When ER is high, SC approaches the fast constant — KAMA tracks price more closely.
  • When ER is low, SC approaches the slow constant — KAMA barely moves.
  • Squaring amplifies the effect, making KAMA even less responsive during noisy periods.

Step 3 — Final KAMA Value

The calculation follows the same recursive structure as an EMA, but with a dynamic smoothing factor:

KAMA = Previous KAMA + SC × (Price − Previous KAMA)

The first KAMA value is initialized as a simple moving average. Each subsequent bar updates KAMA using the formula above. Because SC changes every bar based on the current ER, KAMA adapts continuously.

How to Add KAMA in TradingView

TradingView lists KAMA in its Built-in Indicators documentation. No Pine Script or custom code is required.

Step-by-Step Setup

  1. Open a chart — Navigate to TradingView and open a chart for your chosen instrument.
  2. Open the indicator panel — Click the Indicators button on the top toolbar.
  3. Search for KAMA — Type Kaufman or KAMA in the search box. Look for the result labeled "Kaufman's Adaptive Moving Average" under the Built-in tab (not Community Scripts).
  4. Click to add — Select the indicator. It appears as an overlay line directly on your price chart.
  5. Configure settings — Click the gear icon on the indicator label to open the settings dialog. Verify the defaults shown match your expectations.

TradingView KAMA Inputs and What They Change

InputCommon DefaultWhat It Controls
SourceCloseThe price data used for calculation (Close, Open, HL2, HLC3, etc.)
ER length10Lookback period for the Efficiency Ratio. Lower = faster adaptation.
Fast length2Controls the fastest possible smoothing. Lower = more responsive in trends.
Slow length30Controls the slowest possible smoothing. Higher = flatter during chop.
TimeframeChartAllows multi-timeframe KAMA overlay on a lower-timeframe chart.

Common defaults above are based on the Kaufman/ChartSchool starting point of KAMA(10, 2, 30). Verify against TradingView's current indicator dialog when you add it.

KAMA Settings: What to Change First

Before adjusting parameters arbitrarily, understand what each input does to the line's behavior:

SymptomParameter to Consider AdjustingDirection
KAMA too slow to react to new trendsER lengthLower it
KAMA too noisy / whipsawingER lengthRaise it
KAMA barely moves even in trendsFast lengthLower it (e.g., 2)
KAMA reacts to every small fluctuationSlow lengthRaise it (e.g., 30–50)

Changes should be validated through backtesting, not applied based on visual impression alone.

KAMA Settings to Test by Trading Style

These are starting points to test — not universal best settings. Market, timeframe, spread, liquidity, and your own risk rules all affect which parameters work for a given instrument.

Trading StyleER LengthFast LengthSlow LengthTimeframe
Scalping5–72301m – 5m
Day trading7–102305m – 1h
Swing trading10–142301h – Daily
Position trading14–20530Daily – Weekly

Run backtests on your specific instrument before committing real capital to any configuration.

Practical KAMA Strategies to Backtest

The following strategies are commonly discussed in technical analysis literature. None are guaranteed to be profitable. Always backtest on historical data with realistic transaction costs before considering live use.

Strategy 1: Price-KAMA Crossover

SignalConditionInterpretation
Potential bullishPrice closes above KAMA after being below itMay signal uptrend beginning; requires confirmation
Potential bearishPrice closes below KAMA after being above itMay signal downtrend; requires confirmation

Because KAMA may flatten during choppy markets, crossovers during that phase can be noise. A small percentage threshold (e.g., only act when price clears KAMA by 0.5% or more) may reduce false entries in some cases — but test this before assuming it helps.

Strategy 2: KAMA Direction as a Trend Filter

Read the slope of the KAMA line:

  • KAMA rising → Upward bias. Some traders look for long setups only.
  • KAMA falling → Downward bias. Some traders look for short setups only.
  • KAMA flat → No clear directional efficiency. Trend-following entries may be premature.

This approach is sometimes used as a filter for other indicators — for example, only considering RSI oversold signals when KAMA is rising. Test any such filter combination on your instruments.

Strategy 3: Dual KAMA Crossover

Plot two KAMAs with different ER lengths:

  • Fast KAMA: ER length = 5–8
  • Slow KAMA: ER length = 20–30

When the fast KAMA crosses above the slow KAMA, it may indicate upward momentum. When it crosses below, momentum may be weakening. This is analogous to a dual EMA crossover but with adaptive smoothing on both lines. Backtest before use.

Strategy 4: KAMA as Dynamic Support and Resistance

In trending markets, some traders observe KAMA acting as a moving floor or ceiling:

  • In an uptrend, pullbacks toward the rising KAMA line can be potential buying areas.
  • In a downtrend, rallies toward the falling KAMA line can be potential shorting areas.

This approach has lower value when KAMA is flat — the line does not meaningfully represent a support or resistance level if the market is ranging. Confirm trend before applying.

Confirmation Ideas to Backtest with KAMA

Traders often pair KAMA with other tools. These combinations should be tested before use — they are not inherently "powerful" without validation on your specific instrument.

KAMA + RSI

  • Long idea: KAMA is rising + RSI dips below 30 then crosses back above 30.
  • Short idea: KAMA is falling + RSI rises above 70 then crosses back below 70.

KAMA + MACD

  • Long idea: Price is above KAMA + MACD line crosses above the signal line.
  • Short idea: Price is below KAMA + MACD line crosses below the signal line.

KAMA + ATR

Use KAMA for trend direction and ATR to size stop-loss levels:

  • Example: In a long position, place a stop below KAMA minus 1× ATR, adjusted for the instrument's volatility.

All three combinations need independent backtesting. No combination reliably reduces risk without validation.

When KAMA Can Mislead You

KAMA's adaptive design does not prevent all false signals. Understanding its failure modes helps you use it more carefully:

  • Choppy range breakouts: If price briefly breaks out of a range with enough momentum to raise the ER, KAMA may begin following — then price re-enters the range. KAMA does not prevent false breakouts.
  • Parameter overfitting: With three adjustable inputs, it is easy to optimize KAMA(ER, fast, slow) to fit historical data precisely, producing results that do not generalize to new data.
  • Low-liquidity or thin markets: In thinly traded instruments or extreme low-volume periods, individual bar moves can distort the ER calculation.
  • Very short timeframes: On 1-minute charts, microstructure noise can dominate. Parameters need careful testing at the shorter end.
  • Flat-line state misread: When KAMA is horizontal, it is indicating low directional efficiency — crossovers during this phase may not carry directional meaning.

KAMA vs. Other Moving Averages

FeatureSMAEMAKAMA
SmoothingFixedFixedDynamic (adaptive)
Lag in trendsHighModerateLower (speeds up when ER is high)
Whipsaws in chopHighHighAims to reduce (slows when ER is low)
ParametersOne lengthOne lengthThree (ER, fast, slow)
Best forLong-term trend referenceShort-term trend referenceAdaptive trend filtering; still vulnerable to false signals in chop and reversals

The Hull Moving Average (HMA) also targets lag reduction, using weighted averages and a square-root period calculation. HMA tends to maintain a faster response across conditions; KAMA is faster only when it detects efficiency. How they compare on a specific instrument in specific conditions varies — backtest both before choosing.

Interpreting KAMA on a Live Chart

Phase 1: Strong Trend

Price moves consistently in one direction. ER rises toward 1. KAMA accelerates and tracks price more closely. Crossover signals may be cleaner in this phase — but not necessarily reliable. The line has a clear slope.

Phase 2: Consolidation

Price moves sideways. Bar-to-bar volatility increases but net directional change shrinks. ER drops toward 0. KAMA flattens. Crossovers during this phase often have no directional meaning. The flat line is a signal to reassess whether trend-following entries are appropriate.

Phase 3: Trend Resumption or Failure

If price breaks out with conviction, ER often rises and KAMA may respond faster. If the breakout fails and price returns to the range, KAMA may stay flat. This self-correcting behavior is the intended advantage — but false breakouts still occur.

Before Using KAMA Live: A Checklist

  • Understand what each input (ER length, fast, slow) does before changing it
  • Backtest on at least 6–12 months of historical data for the target instrument
  • Account for spread, commissions, and slippage in your backtest
  • Test in at least two different market conditions (trending and ranging period)
  • Define clear entry, exit, and stop-loss rules — not just "KAMA crossover"
  • Paper trade or replay before using real capital
  • Do not optimize all three parameters simultaneously without a walk-forward validation

FAQ

Is KAMA a leading or lagging indicator?

KAMA is a lagging indicator, like all moving averages. It dynamically adjusts its lag: during strong trends, it lags less than SMA or EMA because it speeds up; during choppy markets, it deliberately lags more to filter noise. KAMA describes current trend efficiency — it does not predict future price direction.

What are the default KAMA settings in TradingView?

The common starting point attributed to Perry Kaufman by StockCharts is KAMA(10, 2, 30): ER length of 10, fast length of 2, slow length of 30. TradingView's built-in indicator uses the same inputs. Always verify the actual default values in the indicator's settings dialog when you add it to your chart, as platform defaults can change.

Is KAMA better than EMA?

KAMA and EMA are designed differently. EMA uses a fixed smoothing period. KAMA uses the Efficiency Ratio to adjust its speed, aiming to follow trends more closely and slow down in chop. Whether KAMA performs better than EMA on your instrument depends on market conditions, timeframe, and parameters. Neither is universally superior — backtest both before deciding.

What is the Efficiency Ratio telling me?

The Efficiency Ratio measures signal versus noise in price movement. If price moves $10 over 10 bars in a straight line, ER = 1 (perfectly efficient). If price zigzags and ends near where it started, ER approaches 0 (all noise, no net direction). KAMA uses this ratio to decide how closely to track price each bar.

Can I use KAMA for crypto trading?

KAMA can be applied to any liquid market with price data, including Bitcoin, Ethereum, and other cryptocurrencies. However, crypto markets have high baseline volatility and 24/7 trading with gaps, which require stricter risk controls. Test KAMA parameters specifically for the crypto instrument and timeframe you plan to trade.

Does KAMA repaint in TradingView?

KAMA is a recursive calculation where each bar's value depends on the previous bar's KAMA value and the current bar's ER. The current bar's value can change while the bar is still forming, which is normal for any indicator calculated on an unfinished bar. Completed historical bars do not repaint. If you observe unexpected behavior, check TradingView's official documentation or community forum for the current indicator's confirmed behavior.

What should I change first if KAMA isn't working as expected?

Start with ER length — it has the largest effect on how quickly KAMA adapts. Lower it if KAMA is too slow; raise it if KAMA is too noisy. Adjust fast and slow lengths only after understanding the ER length effect. Validate any change through backtesting rather than visual inspection alone.

Next Steps

  1. Add KAMA to your TradingView chart using the steps above and observe how the line behaves across different market phases on your preferred instrument.
  2. Compare KAMA with your current moving average — overlay both on the same chart and note where each produces cleaner or noisier signals over a 3-month sample.
  3. Practice with replay before risking capitalChartMini offers browser-based historical chart replay with virtual money, which can be useful for practicing how to read moving-average behavior and make decisions without real-money pressure.
  4. Add a confirmation indicator — pair KAMA with RSI, MACD, or ATR as described above, backtest the combined system, and define clear rules before trading live.

References

IW

Iven W.

Founder of ChartMini, MBA, and active trader since 2007 with nearly two decades of experience in forex and equity markets. Built ChartMini to help traders practice chart reading and replay-based trading skills.