Fractal Adaptive Moving Average

Feb 6, 2018

Static chart image
Signals
Moving Averages

The Fractal Adaptive Moving Average indicator provides a trend-following tool that dynamically adjusts its smoothing factor based on the fractal dimension of price movements to better filter noise during consolidations. By adapting to the market's volatility, it aims to remain highly responsive during strong trends while flattening out during range-bound periods.

Usage

The Usage section describes how the script can be used to identify trend direction and momentum shifts. Traders typically use the FRAMA to distinguish between trending and ranging market conditions.

  • Trend Identification: When the FRAMA line is rising, it indicates a bullish trend. Conversely, a falling FRAMA suggests a bearish trend.
  • Trend Changes: The indicator includes a visual toggle to highlight movements. When enabled, the line changes color (typically green for upward movement and red for downward movement) to signal potential shifts in momentum.
  • Filtering Market Noise: During periods of low volatility or sideways movement, the fractal dimension calculation causes the FRAMA to move horizontally. This helps traders avoid "whipsaw" signals that often plague traditional moving averages like the SMA or EMA.

Details

The Fractal Adaptive Moving Average was developed by John Ehlers and is based on the theory that financial markets are fractal in nature. Unlike standard moving averages that use a fixed period, FRAMA calculates the fractal dimension of price over a specific lookback window.

The logic follows these primary steps:

  1. Dimension Calculation: The script calculates the highest highs and lowest lows over two half-periods ($n1$ and $n2$) and the full period ($n3$).
  2. Fractal Dimension ($d$): These values are used to determine the dimension of the price curve. A straight line has a dimension of 1, while highly volatile, "planar" price movement approaches a dimension of 2.
  3. Smoothing Factor: The exponent of the fractal dimension is used to determine the alpha (smoothing constant). This ensures that if price moves in a specific direction with low complexity (a trend), the average follows closely. If price is erratic, the average slows down significantly.

The current implementation includes optimized alert conditions that trigger when the slope of the FRAMA changes direction.

Settings

  • Length: The lookback period used to calculate the fractal dimension. Higher values result in a smoother line that is less sensitive to minor price fluctuations.
  • Highlight Movements?: A boolean toggle that changes the color of the indicator based on whether the FRAMA value is increasing or decreasing.
  • Source: The price data point used for calculations (e.g., Close, Open, HL2).

FAQ

How does FRAMA differ from a standard Exponential Moving Average? While both use a smoothing factor, the EMA uses a fixed alpha based on time. The FRAMA dynamically adjusts its alpha based on the complexity and "fractalness" of price action, making it more responsive to trends and more stable during ranges.

What is the significance of the Fractal Dimension in this script? The Fractal Dimension measures how much space a price curve fills as it moves. A lower dimension indicates a more linear, trending move, allowing the indicator to track price closely. A higher dimension indicates a congested, range-bound market, causing the indicator to lag more to avoid false signals.

How can I access the Fractal Adaptive Moving Average? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.