Adaptive-lookback MA
An adaptive-lookback MA (often just "adaptive moving average") is a moving average whose effective length is recomputed on every bar rather than fixed in advance. It is a Trend concept. The Library holds 2 implementations, each one ready to run on Vela.
Top Adaptive-lookback MA indicators
The top custom implementations, built on the original standard Adaptive-lookback MA formula.
2 total
Open the top Adaptive-lookback MA implementation below on Vela, then have Quant, our coding agent, turn it into a strategy you can backtest.
What is an Adaptive-lookback MA?
An adaptive-lookback MA (often just "adaptive moving average") is a moving average whose effective length is recomputed on every bar rather than fixed in advance. The calculation measures the current state of the market (how efficiently price is travelling, how volatile it is, or which cycle length dominates) and maps that reading onto a smoothing constant between a fast bound and a slow bound. Most variants keep the familiar EMA recursion, where each new value moves a fraction alpha toward price, and simply let alpha vary from bar to bar.
What separates the family members is the driver. Perry Kaufman's KAMA scales alpha with the efficiency ratio: the absolute net price change over a window divided by the sum of absolute bar-to-bar changes. Tushar Chande's VIDYA uses a momentum or volatility ratio, John Ehlers' FRAMA converts the fractal dimension of the price path into alpha, MAMA/FAMA adapts through the rate of change of the cycle phase measured by a Hilbert transform, and the McGinley Dynamic varies its speed through a price-to-average ratio in its divisor.
The design matters because it attacks the oldest tradeoff in trend following: short lookbacks track price closely but whipsaw through every range, while long lookbacks filter the chop and then lag every turn. An adaptive lookback tries to buy both properties with one line, hugging price when movement is directional and going flat when it is not. The adaptation is reactive rather than predictive, so a fresh regime change still costs several bars of lag.
How to calculate an Adaptive-lookback MA
Every member of the family follows the same three-part recipe (measure, map, smooth); the variants differ only in what they measure in step one.
- 1Measure market state over a reference window. KAMA computes the efficiency ratio (absolute net change divided by the sum of absolute per-bar changes), VIDYA the absolute value of a momentum reading or a volatility ratio, FRAMA an estimate of fractal dimension, MAMA the rate at which the cycle phase advances from bar to bar.
- 2Map that measurement onto a smoothing constant between a fast bound and a slow bound, so a perfectly efficient move produces the fast setting and pure noise produces the slow one. KAMA additionally squares the scaled constant, pushing choppy readings even closer to zero.
- 3Run the recursion each bar: the new average equals the previous average plus the smoothing constant times the difference between price and the previous average. Because the constant changes every bar, the effective lookback stretches and shrinks continuously.
- 4Read the output as both average and state signal: a line that has gone flat is reporting inefficient, rangebound conditions, while a line that turns and tracks price closely is reporting directional movement.
How it's calculated
A moving average whose smoothing speed shifts each bar between a fast and a slow limit based on how directional recent price movement is.
These are the formulas of Kaufman's Adaptive Moving Average (KAMA), the most widely published adaptive-lookback design.
Seed the recursion with KAMA_0 equal to the first close or a short SMA.
VIDYA (alpha scaled by the absolute Chande Momentum Oscillator) and FRAMA (alpha from fractal dimension) follow the same recursive form with different adaptation inputs.
How traders use it
- As a self-throttling trend filter: take longs only above the line and shorts only below it, and let the slow, flat stretches in ranges suppress the signals a fixed-length filter would keep generating. The filter is quieter in chop, not silent; ranges still produce some crossings.
- As dynamic support and resistance: in a directional move the lookback shortens and the line rides close behind price, so pullbacks into it are watched for continuation. Once the line flattens, that read is void; a flat adaptive MA is a chop warning, not a level.
- Inside crossover systems, replacing one or both fixed averages so the pair separates decisively in trends and stays intertwined in ranges. This tends to reduce whipsaw trades rather than eliminate them, and it adds parameters that need honest out-of-sample checking.
- As the smoothing engine inside other tools: the same adapt-then-smooth recursion is routinely applied to oscillator inputs, trailing stops, and band midlines, so the downstream tool inherits the fast-in-trend, slow-in-chop behavior.
Adaptive-lookback MA vs neighboring averages
EMA: An EMA fixes its smoothing constant at design time; speed is a permanent choice. An adaptive-lookback MA makes that choice at runtime, sliding between fast and slow bounds, so one line can act like a short EMA in trends and a long one in ranges.
KAMA: KAMA is the archetype, not a synonym for the family. It is one specific adaptation rule (the efficiency ratio scaled between fast and slow constants, then squared). Other members reach the same goal through volatility, fractal dimension, or measured cycle length.
HMA: The HMA is fast everywhere: a fixed weighted construction that reduces lag unconditionally, in trend and chop alike. An adaptive MA is fast only when conditions justify it, deliberately accepting lag in ranges to avoid whipsaw.
Adaptive Parameterization: Adaptive parameterization is the general technique of letting any setting (lengths, multipliers, thresholds) respond to market state. An adaptive-lookback MA is that technique applied to a single parameter of a single tool: a moving average's length.
Adaptive-lookback MA FAQ
Turn Adaptive-lookback MA into a trading strategy.
Open the top implementation from this page in Vela. Quant, our coding agent, builds the strategy with you and backtests it on real data.
Browse this familyTrend104 concepts mapped · 104 in the Library
- Adaptive-lookback MA
- ADX / DMI System
- Alligator
- ALMA
- Anchored MA
- Andrews' Pitchfork
- Aroon
- ATR Trailing Regime
- Bessel Filter
- Breakout
- Butterworth Filter
- Chande Kroll Stop
- Chandelier Stop
- Chebyshev Filters
- Climactic Moves
- Continuation
- Coral Trend
- Correlation Trend Indicator
- Death Cross
- DEMA
- Displaced MA
- Donchian Trend Rules
- Dynamic S/R Via MA
- Ehlers Instantaneous Trendline
- Ehlers SuperSmoother
- Elastic Volume-weighted MA
- Elliptic Filter
- EMA
- Fan Principle
- FRAMA
- Gann Box
- Gann Fan & Angles
- Gann HiLo Activator
- Gann Method
- Gann Square of 9
- Gaussian Filter
- Geometric MA
- Golden Cross
- Guppy GMMA
- Halftrend
- Harmonic MA
- Higher-timeframe Trend Filter
- HMA
- Ichimoku Signals
- Ichimoku System
- Ichimoku Theories
- JMA
- KAMA
- Kaufman Efficiency Ratio
- Laguerre Filter
- Linear-regression Channel
- LSMA
- MA Envelope
- MA of MA
- MA Ribbon
- MA Slope Filter
- MAMA/FAMA
- McGinley Dynamic
- MLMA
- Moving Average Crossovers
- NRTR
- Order-statistic Filters
- Parabolic SAR
- Parallel Channel
- Polynomial Regression Band
- Pullback
- R-squared Trend Fit
- Rainbow MA Stack
- Random Walk Index
- Range Filter
- Retest
- Reversal
- RMA
- Savitzky-Golay Filter
- Sine-weighted MA
- SMA
- Speed Resistance Lines
- Standard-error Channel
- Supertrend
- Swiss Army Knife Filter
- SWMA
- T3
- TEMA
- TRAMA
- Trend Acceleration/inflection
- Trend Exhaustion
- Trend Intensity Index
- Trend Magic
- Trend Regime Label
- Trend-quality Composites
- Trendline
- Triangular MA
- UHL Adaptive MA
- Ultimate Smoother
- Vertical Horizontal Filter
- VIDYA
- Volume-adjusted MA
- Vortex
- VWMA
- Weinstein Stage Analysis
- Whittaker–Henderson Smoother
- Windowed FIR Smoothing
- WMA
- ZLEMA

