All indicators

Fractal Adaptive Moving Average (real one)

Jun 2, 2016

Static chart image
SignalsMoving Averages

The Fractal Adaptive Moving Average indicator provides a highly responsive trend-following tool that adjusts its smoothing constant based on the fractal dimension of price action to stay flat during ranges and follow trends closely.

Usage

The Usage section describes how the script can be used to identify market regimes and potential entry or exit points. Because the FRAMA is designed to be adaptive, it reacts significantly faster than a traditional Exponential Moving Average (EMA) when a strong trend emerges, while remaining stationary when price moves sideways.

Trend Identification

Traders can use the FRAMA to determine the current trend direction. When price is trading above the FRAMA, the market is generally considered to be in an uptrend. Conversely, when price is trading below the FRAMA, the market is in a downtrend. The slope of the line also provides insight into trend strength; a steep slope indicates a high fractal dimension and a strong trend, while a flat line indicates a congested market.

Crossover Signals

The indicator includes built-in logic for price crossovers. A move where the price crosses above the FRAMA can be interpreted as a bullish reversal signal, while a cross below the FRAMA may signal a bearish reversal.

Details

The Fractal Adaptive Moving Average was developed by John Ehlers and is based on the theory that financial markets are fractal in nature. This means that price patterns look similar regardless of the timeframe being analyzed.

The script execution follows these core concepts:

  • Fractal Dimension Calculation: The indicator measures the "jaggedness" of price movement over a specific lookback period (Length). It divides this period into two halves to calculate the rate of change in price ranges (N1 and N2) relative to the total range (N3).
  • Dimension-Based Alpha: The resulting fractal dimension is used to determine the alpha (smoothing constant). In highly directional markets, the fractal dimension is lower, causing the indicator to use a faster smoothing factor. In choppy markets, the fractal dimension increases, causing the indicator to use a slower smoothing factor.
  • Adaptive Range: The calculation is bounded by the Fast Length and Slow Length settings, ensuring the moving average stays within a logical range of responsiveness.

Settings

  • Source: The price data point used for calculations (default is hl2).
  • Length: The lookback window used to calculate the fractal dimension.
  • Fast Length: The lower bound for the adaptive smoothing, representing the most responsive the indicator can become.
  • Slow Length: The upper bound for the adaptive smoothing, representing the least responsive (most smoothed) the indicator can become.

FAQ

How does FRAMA differ from a standard Exponential Moving Average (EMA)?

Unlike a standard EMA which uses a fixed smoothing constant, the FRAMA dynamically changes its smoothing factor based on the current volatility and fractal dimension of the market, allowing it to reduce lag during trends.

Why does the indicator sometimes stay flat?

The indicator stays flat during consolidation periods because the fractal dimension calculation detects a lack of trend, causing the smoothing constant to favor the "Slow Length" setting to avoid false signals.

How can I access this indicator?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.