All indicators

Autonomous Recursive Moving Average

May 31, 2019

Static chart image
SignalsMoving Averages

The Autonomous Recursive Moving Average (ARMA) indicator is an adaptive trend-following tool designed to minimize lag while providing a flat filtering effect during non-trending market conditions. By utilizing a ternary operator to minimize the sum of squares, it offers a robust alternative to traditional exponential smoothing methods, specifically aiming to reduce noise in ranging markets.

Usage

The Usage section describes how the script can be used, particularly in identifying trend direction and filtering out market noise.

  • Trend Identification: When the price is consistently above the ARMA line, it indicates a bullish trend. Conversely, when the price is below the line, a bearish trend is suggested.
  • Ranging Market Filter: One of the primary uses of the ARMA is its ability to flatten during sideways price action. By observing when the indicator line stays horizontal, traders can avoid entering trades during indecisive market phases.
  • Crossover Signals: Standard price-to-indicator crossovers can be used as potential entry or exit points, though the ARMA is specifically optimized to remain "boxy" or flat until a significant price movement occurs.

Details

The ARMA distinguishes itself from other adaptive moving averages by avoiding the common pitfalls of standard exponential averaging. Instead of adapting via a smoothing variable, it employs a ternary logic system to decide whether to follow the price or remain at its previous value based on a calculated deviation threshold.

The calculation involves a deviation factor ($d$) derived from the cumulative absolute difference between the source price and the previous moving average value, scaled by the Gamma parameter. If the price moves beyond this threshold, the indicator adjusts; otherwise, it remains flat. The result is further smoothed using a double Simple Moving Average (SMA) process to ensure consistency, though this can occasionally result in minor overshoots due to the recursive nature of the calculation.

Settings

  • Length: Determines the period used for smoothing during active trends. Lower values increase reactivity, while higher values produce a smoother, slower-moving line.
  • Gamma: Sets the trend sensitivity threshold. Higher values increase the "flatness" of the filter, requiring larger price movements to trigger a change in the indicator's value. This is the primary setting for skipping ranging markets.
  • Zero-Lag: A toggle that, when enabled, applies a lag-reduction technique by adjusting the source price based on its recent rate of change. This allows the indicator to react faster to price reversals without necessarily increasing noise.

FAQ

How does Gamma affect the signals? Gamma controls the "gate" for price updates. A high Gamma value will make the indicator stay flat for longer periods, which is useful for filtering out minor fluctuations, whereas a low Gamma makes it act more like a standard moving average.

What is the benefit of the Zero-Lag option? The Zero-Lag option compensates for the inherent delay found in smoothing calculations, allowing the ARMA to track price pivots more closely without losing its ability to filter flat markets.

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.