Tendencia TrendAdaptiveMT5 Built-in Disponible en Builder

FrAMA

FrAMA is a moving average with no smoothing setting. Every bar it measures the fractal dimension of the recent price curve and turns that into the weight it gives the newest price — near 1 when the market is moving in a straight line, near 0.01 when it is going nowhere. MetaTrader 5 ships it as iFrAMA, and the one length you set is only half the window it reads.

Period set
14
Bars actually read
28
Smoothing settings
0
FrAMA (14) against a fixed EMA over the same 28-bar window1.0 — the average equals price, nothing is smoothed0.01 — the floor a pure range drives it toSmoothing factor per bar (derived — iFrAMA publishes only the line)

Ilustrativo — datos sintéticos, no una cotización en vivo.

What FrAMA tells you

Every moving average is a decision about how much of the newest price to let in. On an EMA that decision is made once, when you pick the length, and never revisited. FrAMA remakes it on every bar. It measures how jagged the recent price curve is — its fractal dimension — and converts that straight into the weight. A market travelling in a clean line scores 1 and the average is handed the whole price, so the line sits exactly on it. A market thrashing back and forth in the same range scores 2 and the weight collapses to a hundredth, so the line goes flat. The length you set does not control the smoothing; it only controls how far back the measurement looks.

  • There is no fast/slow pair and no smoothing constant — the weight is measured, not chosen
  • The window is twice the period you set
  • Only the line is published; the weight it used is not
  1. 1 Measure the ranges of the recent bars, the bars before those, and both together
  2. 2 Turn the three into a fractal dimension between 1 (a line) and 2 (a scribble)
  3. 3 Weight = e^(−4.6 × (dimension − 1)), applied to the newest price
Mostrar la fórmula y detalles de cálculo

Every moving average makes one decision: how much of the newest price to let in. On an EMA you make it once, by choosing a length. FrAMA remakes it on every bar, from a measurement:

  1. n1 = the range of the last N bars, n2 = the range of the N before those
  2. n3 = the range of all 2N bars together
  3. d = log₂((n1 + n2) / n3), and the weight is e^(−4.6 × (d − 1))

d is a fractal dimension: how much path the price used to get where it went. A straight line scores 1 and the weight comes out at 1 — the average takes the whole of the new price and becomes it. A pure oscillation scores 2 and the weight collapses to 0.01 — the line goes flat. Both of those are exact, not approximate.

The period you set is half the window. This is the thing worth knowing before choosing a number. Three ranges are needed and they span 2N bars, so iFrAMA with a period of 14 is reading 28. MetaTrader’s own implementation says so out loud: it sets PLOT_DRAW_BEGIN to 2 × period − 1 and refuses to calculate at all while fewer bars exist. That is why the template pairs FrAMA(14) with a fixed average of 28 — so the two lines are measuring the same stretch of chart and only the weighting differs.

Applied price does much less than it looks. The node exposes it and the generated EA passes it to iFrAMA, but the jaggedness is measured from the bars’ own highs and lows, whatever applied price is set to. It selects the series that gets smoothed; it does not change how much smoothing happens. On an ordinary moving average that setting is one of two controls. Here it is close to cosmetic.

In a strong trend the average becomes price. A weight of 1 means no history is carried at all. The line lands on price and rides it — correct behaviour, and quietly fatal to any rule built on price crossing the line, because in exactly the regime such a rule is meant to catch, the two series are identical. Compare the line against something else instead.

Two smaller things follow. The weight is not clamped: it stays inside 0.01 to 1 only while the two half-windows share a price range, and a gap between them sends d below 1 and the weight above it — on a 14-period window a 3-unit gap gives d = −0.81 and a weight near 4,080. And the weight is not published: iFrAMA has a single buffer, and it is the line. The chart above draws the factor because it is the whole point of the indicator, but no flow can branch on it.

Señales

Las señales distintivas y testeables que ofrece FrAMA — y el régimen adecuado para cada una.

Cross Against a Fixed Average

Listo en Builder
Condición
FrAMA crosses a fixed average of the same window
Mejor régimen
Trending
Uso típico
The template's rule — the two separate when the market's character changes

Price Against the Line

Listo en Builder
Condición
Price sits above or below FrAMA
Mejor régimen
Trending
Uso típico
A direction filter; note it degenerates in a strong trend, where the line is glued to price

The Line Going Flat

Listo en Builder
Condición
FrAMA stops sloping while price keeps moving around it
Mejor régimen
Range
Uso típico
A range detector — the flatness is the reading, not a side effect

Reading the Smoothing Factor

Lógica avanzada
Condición
The weight itself moves from its floor toward 1
Mejor régimen
Either regime
Uso típico
A regime signal in principle; iFrAMA does not publish the factor, so it cannot be built from this node

Implementación en MT5

Lo que MetaTrader 5 calcula y dibuja realmente: la referencia de cada regla de esta página.

Búferes

Índice Búfer Dibujado en MT5 como Qué contiene
0 MAIN_LINE FrAMA The average itself, and the only series iFrAMA publishes. The fractal dimension and the smoothing factor it produces are computed inside the indicator and never exposed — there is no second buffer to read them from, which is why a flow cannot branch on how adaptive the line currently is.

Notas de la plataforma

Funciona mejor / usar con cuidado

Ningún indicador tiene ventaja universal. Aquí es donde FrAMA ayuda — y donde engaña.

Funciona mejor

  • Markets that alternate between trending and going quiet, which is what the adaptation is for
  • As the trend side of a pair, where a fixed average supplies the reference it is measured against
  • Higher timeframes, where a 28-bar window covers a meaningful stretch
  • Anywhere a fixed length has been re-tuned repeatedly — this replaces that tuning with a measurement

Usar con cuidado

  • As a price-cross trigger in a strong trend: the weight reaches 1, the line lands on price, and crossings become noise
  • Short histories — nothing is drawn at all until twice the period has passed
  • Assuming applied price changes the responsiveness; it does not, it only changes what gets smoothed
  • Instruments that gap: the dimension is only bounded while the two half-windows overlap in price

Crear una estrategia FrAMA

Conecta la señal a las reglas de entrada y salida, luego exporta un EA MT5 compilable — sin código.

  1. One FrAMA node at 14 — so the window it reads is 28 bars
  2. One Moving Average node, EMA, set to that same 28
  3. FrAMA crosses above the fixed average → Close the short, then Open Buy · SL 70 / TP 210
  4. FrAMA crosses below it → Close the long, then Open Sell
  5. Both read the last closed bar, so a cross is a settled fact

Combinar FrAMA con otros indicadores

Un indicador raramente se sostiene solo. Estas combinaciones cubren los puntos ciegos de FrAMA.

FrAMA + AMA

  1. AMA rising
  2. FrAMA crosses above the fixed average
  3. Buy
Por qué
The other adaptive average on this site, and the pairing is instructive because they adapt to different measurements rather than to different degrees. Kaufman's version reads an efficiency ratio — net travel divided by total travel — so it responds to how directional the move was. This one reads the fractal dimension of the curve, so it responds to how jagged the path was. A market can be directional and jagged at once, which is exactly where the two disagree, and that disagreement is more informative than either line alone
Mejor régimen
Either regime

No single-flow template pairs them. Start from FrAMA vs Fixed EMA and add an AMA node with a Compare against a second AMA at a further shift, joined to the Cross with an And gate.

Abrir el Builder →

FrAMA + ADX

  1. ADX above 25
  2. FrAMA crosses above the fixed average
  3. Buy
Por qué
FrAMA already knows when the market is quiet — that is what the flat line means — but it has no way to say so to the rest of a flow, because the smoothing factor is not published. A trend-strength reading supplies the missing output: it states in a number what the flat line only shows visually, and it is the practical answer to this indicator's one structural limitation
Mejor régimen
Trending

No single-flow template combines them. Add an ADX node with a Compare at 25 to FrAMA vs Fixed EMA and join it to the Cross with an And gate.

Abrir el Builder →

FrAMA + Moving Average

  1. A fixed EMA over 28 bars
  2. FrAMA over the same 28 bars
  3. Cross
Por qué
The comparison the template is built on, and worth understanding before anything is added to it. A plain average weights every bar in its window identically whatever the market is doing; FrAMA reweights on each bar from a measurement. Running them over the same window length isolates the adaptation as the only difference between the two lines, which is the cleanest way to see what this indicator actually contributes
Mejor régimen
Trending

This is the FrAMA vs Fixed EMA template itself. Change the fixed side's method from EMA to SMA to see how much of the signal came from the weighting rather than the adaptation.

Abrir el Builder →

FrAMA + DEMA

  1. FrAMA above the fixed average
  2. Fast DEMA crosses above slow
  3. Buy
Por qué
The two ways of attacking lag, and they are genuinely opposite. This page's line varies how much smoothing to apply, easing off when the market measures as directional; DEMA leaves the smoothing untouched and subtracts an estimate of the lag instead. The difference shows in ranges — an adaptive line goes flat and stops saying anything, while an extrapolated one keeps leading and keeps crossing. Requiring both is asking for a move that is directional and clean at once
Mejor régimen
Trending

No single-flow template pairs them. Add two DEMA nodes into a Cross on top of FrAMA vs Fixed EMA and join the two conditions with an And gate.

Abrir el Builder →

Parámetros

Valores iniciales para validar en tu propio par y temporalidad — no son configuraciones garantizadas.

Parámetro Valor predeterminado Rango de prueba sugerido Qué hace
Period 14 1–999 How far the measurement looks — and the number to be careful with, because it is half the story. The three ranges the dimension is built from span 2 × period bars in total, so a period of 14 reads 28. MT5 draws nothing until that many bars exist. This does not make the line smoother or faster in the way an EMA length does; it changes the stretch of chart the jaggedness is measured over.
Applied price Close Close / Open / High / Low / Median / Typical / Weighted Which series gets smoothed. It does not affect the adaptation at all: the fractal dimension is measured from the bars' highs and lows regardless of what is set here. That makes it a far smaller lever than on an ordinary moving average, where applied price and length are the only two controls there are.
Shift 0 0–100 Which bar to read. The template sets it to 1 so a cross is decided on a closed bar. This is not the same as iFrAMA's own ma_shift, which slides the whole line sideways on the chart — the Builder pins that to 0 and exposes only the bar offset, so there is one shift here rather than two.
Timeframe Current Current / M1–MN1 Which timeframe's bars the measurement runs on. Set it above the chart and the line becomes a slower regime backdrop for entries timed on the chart's own bars — the usual way to use an adaptive average as a filter rather than a trigger.

Ajustes preestablecidos iniciales

Default 14 (28-bar window) MT5's own default and the template's setting
Slower 30 (60-bar window) Adapts less often; the dimension is measured over a longer stretch
Faster 8 (16-bar window) Reacts sooner and reaches the 1.0 weight more readily — expect the line to sit on price more of the time

Ejemplos de mercado

Dónde FrAMA funciona, dónde falla y cómo un filtro cambia el resultado.

Funciona

The line woke up

A quiet stretch keeps the average flat while price crosses it repeatedly; then a genuine move starts, the weight climbs toward 1 and the line lifts off the fixed average it had been sitting on. The separation, not the price move, is what the template trades.

Falla

A cross with nothing behind it

The two averages touch and part again inside a range where neither is really sloping. The dimension never leaves the top of its scale, so the adaptive line never actually accelerated — the crossing came from the fixed side drifting.

Filtrado

The same range, with a strength test attached

The identical stretch with a trend-strength condition joined to the cross. The lines still touch; no order is sent, because the flow was asked for a number the flat line cannot supply on its own.

FAQ

Is FrAMA built into MetaTrader 5?
Yes. iFrAMA is a standard MQL5 function taking a symbol, a timeframe, the period, an ma_shift and an applied price, and the terminal also ships a FrAMA custom indicator under Indicators\Examples. The Builder calls the built-in function, so a generated EA carries no dependency on any file being present in the terminal that runs it.
What does the period actually control?
How far back the measurement looks — and it is half the window. The dimension needs the recent `period` bars, the `period` before those, and the combined stretch, so a period of 14 reads 28 bars and nothing is drawn until 28 bars exist. It is not a smoothing length. Doubling it does not halve the responsiveness the way it would on an EMA; it changes the stretch of chart the jaggedness is measured over.
How is it different from AMA?
Both replace a fixed smoothing constant with a measured one, and they measure different things. Kaufman's AMA uses an efficiency ratio — how much net distance the price covered against how much total distance it travelled. FrAMA uses the fractal dimension of the curve, which is about how jagged the path is rather than how far it got. A market can travel a long way by a very rough route, and that is exactly where the two disagree.
Why does changing applied price barely do anything?
Because it is not in the part that adapts. The fractal dimension is computed from the bars' highs and lows regardless of the setting; applied price only selects the series that the resulting weight is applied to. On an ordinary moving average applied price is one of only two controls, so the habit of treating it as significant carries over — here it is close to cosmetic.
Can I use the smoothing factor as a signal?
Not from this node. iFrAMA publishes one buffer and it is the average itself; the dimension and the weight are computed inside and discarded. The chart on this page draws the factor because it is what the indicator is about, but a Builder flow cannot read it. If a flow needs an explicit statement that the market is quiet, that has to come from a different indicator.
Can I build a FrAMA EA without coding?
Yes. The FrAMA vs Fixed EMA template puts a FrAMA node at 14 next to a Moving Average node set to EMA 28 — the same window FrAMA reads — and trades the crossings between them, closing the opposite side before it enters. The period, the fixed length and method, the shift, the stop distances, the lot and the spread limit are all EA inputs.
How should I validate settings before going live?
Backtest on quality tick data, then demo, and check two things that are specific to this indicator. First, that the test period is long enough to contain both regimes — an adaptive average tested only in a trend is being judged on the half of its job it does not need to do. Second, that the instrument does not gap much: the weighting is only well behaved while the two half-windows overlap in price, so an instrument with frequent gaps is testing the arithmetic as much as the strategy. And because the period is a window rather than a smoothing length, resist scanning it — the number that wins a scan is describing the sample, not the market.

Glossary

Términos clave