FDI-Adaptive Non-Lag Moving Average
Sep 21, 2022

The FDI-Adaptive Non-Lag Moving Average indicator utilizes the Fractal Dimension Index (FDI) to dynamically adjust its sensitivity, providing a responsive trend-following tool with minimal lag.
Usage
The Usage section describes how the script can be used to identify market regimes and trend changes. By integrating the Fractal Dimension Index, the moving average automatically speeds up during trending markets and slows down during consolidation, reducing whipsaws.
Users can monitor the gradient coloring of the moving average line to gauge trend momentum. When the price crosses the moving average or when the slope of the average changes direction, it can signal potential entry or exit points. The script also includes optional bar coloring to align the chart's price action with the indicator's trend state.
Details
The core logic of this tool relies on the Fractal Dimension Index (FDI) to measure market efficiency. The FDI determines if price action is trending (persistent) or mean-reverting (random).
- FDI < 1.5: Indicates a trending market. Lower values suggest a stronger, more persistent trend.
- FDI > 1.5: Indicates a trading range or random market behavior.
The calculated FDI value is converted into an adaptive alpha, which is then fed into the Non-Lag Moving Average calculation. This specific moving average uses a cosine-based weighting function to eliminate the delay typically associated with traditional filters. The implementation also features Loxx's expanded source types, allowing for Heikin-Ashi and smoothed price inputs.
Settings
Source Settings
- Heikin-Ashi Better Calculation Type: Selects the smoothing method (AMA, T3, or Kaufman) used when "HAB" source types are selected.
- Source: Choose from a wide variety of price inputs, including standard candle components, Heikin-Ashi variants, and trend-biased sources.
Adaptive Settings
- Fractal Period Ingest: The lookback period used for the Fractal Dimension Index calculation.
- Speed: Controls the base sensitivity/length of the adaptive calculation.
- Color Period: The lookback period used to determine the high/low range for the gradient color mapping.
UI Options
- Color bars?: Toggles whether the price bars on the chart are colored based on the indicator's gradient.
Moving Average Inputs
- Kaufman's Adaptive MA (KAMA) Only: Adjusts the Fast and Slow end constants for the KAMA calculation when used as a source.
- Adaptive Moving Average (AMA) Only: Adjusts the Fast and Slow periods for the AMA calculation when used as a source.
FAQ
How do I interpret the gradient colors?
The colors transition between red and green based on the relative position of the moving average within its recent high-low range, helping to visualize trend strength and exhaustions.
Can I use this for scalping?
Yes, the "Non-Lag" nature of the moving average combined with FDI adaptivity makes it suitable for various timeframes, though higher "Speed" settings may be preferred for shorter-term movements.
How do 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.