Concept

FRAMA

FRAMA, also known as fractal adaptive MA, is a Trend concept. The Library holds 3 implementations, each one a working definition you can pull into Quant.

Top FRAMA indicators

3 total

What is FRAMA?

FRAMA, the fractal adaptive moving average, is John Ehlers' adaptive smoother: an EMA whose smoothing factor is recomputed every bar from the estimated fractal dimension of recent price. The dimension is estimated with a box-counting shortcut that compares the high-low range of the full window against the ranges of its two halves. A dimension near 1 says price traced something close to a straight line; near 2 says it filled space like noise.

Ehlers maps the dimension through an exponential so the smoothing factor runs from about 0.01 (nearly flat) in the choppiest conditions to 1 (hugging price) in the cleanest trends, with 16 bars as the published window. The design goal is the standard adaptive-MA bargain: track trends with little lag and flatten through congestion. KAMA chases the same goal from an efficiency ratio; FRAMA keys it to fractal geometry instead.

How to calculate FRAMA

The published construction uses an even-length window and produces one dimension estimate, and one smoothing factor, per bar.

  1. 1Choose an even window N (Ehlers used 16) and split it into two halves of N/2 bars each.
  2. 2Compute three normalized ranges: each half's highest high minus lowest low, divided by N/2 (call them N1 and N2), and the full window's range divided by N (N3).
  3. 3Estimate the fractal dimension: D = (log(N1 + N2) - log(N3)) / log(2).
  4. 4Convert to a smoothing factor alpha = exp(-4.6 x (D - 1)), clamp it between 0.01 and 1, then update FRAMA = alpha x price + (1 - alpha) x prior FRAMA.

How traders use it

  • As a regime-aware trend line: swapped in for fixed averages in slope and crossover systems so the line accelerates in clean trends and stalls in chop, trimming some whipsaws, though not all, since the dimension estimate itself lags regime changes.
  • As a congestion gauge: the effective alpha, or the fractal dimension behind it, is monitored directly; a flat FRAMA with price oscillating across it is read as ongoing congestion rather than signal.
  • As dynamic support and resistance in trends, in the same manner as other adaptive averages, with the usual caveat that such lines are references, not guarantees.

FRAMA vs other adaptive MAs

KAMA: Kaufman's adaptive MA derives its smoothing constant from the efficiency ratio (net price change divided by the sum of absolute bar-to-bar changes), interpolating between user-set fast and slow EMA constants and squaring the result. Same intent, different regime statistic, and KAMA exposes its speed limits as parameters.

VIDYA: Chande's VIDYA modulates an EMA's alpha by relative volatility or momentum, most commonly the absolute Chande Momentum Oscillator. It speeds up when directional momentum is strong; FRAMA speeds up when the price path is geometrically clean, which is related but not identical.

MAMA/FAMA: Also from Ehlers, MAMA adapts from the rate of change of a Hilbert-transform phase estimate rather than fractal dimension, and ships as a fast/slow pair whose crossovers are the intended signal, whereas FRAMA is a single line.

Related concepts · Moving-average lineage

Concept family

Trend

100 concepts mapped · 88 in the Library

FRAMA FAQ

What are the default FRAMA settings?

Ehlers' published version uses a 16-bar window (the method needs an even length so the window splits into equal halves) and maps the dimension through exp(-4.6 x (D - 1)), clamping the result between 0.01 and 1. Longer windows steady the dimension estimate but make it slower to notice that a regime has changed.

Is FRAMA better than KAMA or VIDYA?

No adaptive average dominates the others. All three solve the same problem with different regime statistics, so they differ mainly in how quickly each recognizes chop versus trend, and all of them can be late at turning points. The family reduces some whipsaw relative to fixed averages but does not eliminate it; test on your own market and timeframe.

Build FRAMA your way.

Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.