Opens in a new tab
Fractal Adaptive Moving Average (FRAMA) Indicator MT4

Fractal Adaptive Moving Average (FRAMA) Indicator MT4

Most moving averages move at one fixed speed no matter what the market is doing. This free MT4 conversion of John Ehlers' Fractal Adaptive Moving Average changes speed on its own — hugging price tightly during strong directional runs and flattening out during choppy, sideways conditions — because its smoothing factor is recalculated every bar…

Download the Fractal Adaptive Moving Average (FRAMA) Indicator MT4

Most moving averages move at one fixed speed no matter what the market is doing. This free MT4 conversion of John Ehlers’ Fractal Adaptive Moving Average changes speed on its own — hugging price tightly during strong directional runs and flattening out during choppy, sideways conditions — because its smoothing factor is recalculated every bar from the market’s own fractal dimension. Download the .mq4 file and it plots directly on your price chart in two lines.

What Is the Fractal Adaptive Moving Average (FRAMA)?

FRAMA, originally published by John Ehlers in the October 2005 issue of Technical Analysis of Stocks & Commodities, is a moving average whose smoothing constant isn’t fixed — it’s derived on every bar from an estimate of the market’s fractal dimension. This build (credited to Matt Kennel’s rework of the original formula) calculates that dimension by comparing the price range over the full lookback period against the combined ranges of its two halves. When price is moving in a clean, efficient trend, that comparison produces a low fractal dimension and the average speeds up to track price closely. When price is choppy and overlapping, the dimension estimate rises toward its maximum and the average slows down and flattens, ignoring the noise.

This version plots two lines rather than the single line most FRAMA implementations use. The first (red) is the FRAMA line itself. The second (blue) is a further-smoothed “signal” version of the FRAMA line, calculated the same adaptive way but with its own, separate signal_multiplier sensitivity — functioning similarly to how a MACD signal line trails the MACD line, giving you a second reference to watch for line crosses.

Key Features

  • Adaptive smoothing speed based on a rolling fractal-dimension estimate, not a fixed period
  • Two-line output: the primary FRAMA line and a secondary, independently-smoothed signal line
  • Plots directly on the price chart as an overlay, like any standard moving average
  • Automatically forces the lookback period to an even number if you enter an odd value
  • Separate sensitivity controls for the main line (multiplier) and the signal line (signal_multiplier)

How to Use It

Copy fractal-adaptive-moving-average.mq4 into your MT4 MQL4/Indicators folder, refresh the Navigator, and drag it onto a chart. It draws directly over price with no separate window needed.

The most common ways to read it are the same as with any adaptive trend line: use the slope of the red FRAMA line itself as a trend filter (rising = uptrend bias, falling = downtrend bias, flattening = the algorithm has detected choppy conditions and is deliberately slowing down), or watch for crosses between the red FRAMA line and the blue signal line as an entry/exit trigger, the same way you’d read a fast/slow moving average pair or a MACD line against its signal line. Because the line’s own speed adapts to conditions, it tends to hug price more tightly through strong trends than a fixed-period EMA of similar length would, and tends to flatten out and act as a more stable reference during ranging conditions instead of whipsawing.

The RPeriod input is the core lookback for the fractal-dimension calculation — the code automatically rounds it down to the nearest even number internally if you enter an odd value, since the dimension estimate splits the period exactly in half. multiplier and signal_multiplier both control how aggressively the calculated dimension translates into a faster or slower smoothing constant; higher values make the line more reactive to dimension changes, lower values make it more conservative.

One implementation detail worth knowing: this version calls MetaTrader’s Comment() function on every tick to print the current bar count in the chart’s top-left corner. Because Comment() is a shared, single-slot display in MT4, this will overwrite any comment text another indicator or EA on the same chart is trying to show — it’s harmless to the calculation itself, but worth remembering if you’re running it alongside something else that also uses on-chart comments.

Best Timeframes / Best Use Cases

Because it adapts its own speed instead of relying on a fixed period, FRAMA is commonly used across a wide range of timeframes without needing much retuning — from intraday H1 charts up to Daily and Weekly for longer-term trend tracking. It’s best suited to trend-following approaches where you want an average that stays with a genuine trend but pulls back and flattens during consolidation rather than constantly generating false crosses. As with any moving average, it will still lag at the very start of a fresh reversal, since the dimension estimate itself is calculated from the preceding price range.

Final Thoughts

FRAMA is one of the more genuinely different moving averages available for MT4 — instead of picking one fixed speed and living with its trade-offs, it recalculates its own responsiveness bar by bar based on how efficiently price is trending. This two-line version adds a signal-line cross option on top of the classic single-line output, giving you more than one way to use it depending on whether you prefer trend-slope reads or line-cross entries.

Download the Fractal Adaptive Moving Average (FRAMA) Indicator MT4
  • RPeriod (default 16) — Core lookback period for the fractal-dimension calculation; automatically rounded down to an even number if an odd value is entered.
  • multiplier (default 4.6) — Controls how strongly the fractal-dimension estimate accelerates or slows the main FRAMA line's smoothing speed.
  • signal_multiplier (default 2.5) — Controls the same adaptive speed calculation for the secondary signal line, independently of the main line.

FAQs About the MT4 Fractal Adaptive Moving Average (FRAMA) Indicator MT4

One Quick Step

Enter your name and email and check your inbox for the download link.