All indicators

Many Moving Averages

Jul 11, 2019

Static chart image
SignalsMoving Averages

The Many Moving Averages indicator provides a flexible framework for plotting two independent moving averages on a single chart, allowing users to select from 15 distinct smoothing algorithms for trend analysis and crossover detection.

Usage

The Usage section focuses on the application of dual moving averages to identify trend direction, momentum shifts, and potential entry or exit points through crossovers. Users can configure a "Fast" and a "Slow" moving average independently.

  • Trend Identification: By using two different lengths (e.g., a 12-period fast MA and a 26-period slow MA), users can visualize the short-term vs. long-term trend bias.
  • Crossover Signals: When the fast MA crosses above the slow MA, it indicates a bullish shift in momentum. Conversely, a cross below indicates a bearish shift. These events can be highlighted on the chart using the "Show Crosses" toggle.
  • Strategy Customization: Different algorithms suit different market conditions. For example, the Hull Moving Average (HMA) reduces lag, while the Kaufman Adaptive Moving Average (KAMA) adjusts its sensitivity based on market volatility.

Details

The script integrates a wide variety of moving average calculations, ranging from classic statistical methods to modern adaptive filters.

Supported Moving Average Types:

  • Standard: SMA, EMA, WMA, VWMA.
  • Reduced Lag: DEMA, TEMA, ZLEMA, HMA.
  • Adaptive: KAMA, FRAMA, VAMA.
  • Statistical/Advanced: LSMA (Linear Regression), ALMA, JMA (Jurik), SMMA.

The script incorporates logic refactored from various contributors in the community, including calculations for the Jurik Moving Average, Kaufman Adaptive Moving Average, and Fractal Adaptive Moving Average.

Settings

The settings are divided into core selection and algorithm-specific parameters.

  • MA Fast/Slow Type: Selects the algorithm for the respective moving average.
  • MA Fast/Slow Source: Determines the price data used for the calculation (e.g., Close, Open, HL2).
  • MA Fast/Slow Length: Sets the lookback period for the calculations.
  • Show Crosses: Toggles the visual triangle plots when the two averages cross.

Algorithm-Specific Settings

  • LSMA Offset: Adjusts the linear regression projection forward or backward.
  • ALMA Offset/Sigma: Controls the smoothness and responsiveness of the Arnaud Legoux Moving Average.
  • Jurik Phase/Power: Adjusts the overshoot and curvature of the JMA.
  • Volatility Lookback: Sets the window for volatility measurement in the VAMA.
  • FRAMA FC/SC: Defines the fast and slow time constants for the Fractal Adaptive Moving Average.
  • KAMA Fast/Slow EMA Length: Configures the efficiency ratio boundaries for Kaufman’s adaptation.

FAQ

How can I set up alerts for crossovers? You can use the built-in alert conditions for "Crossover," "Crossunder," or "Any Cross" by selecting the indicator in the TradingView Alert menu.

Can I use the same MA type for both lines? Yes, you can select the same algorithm for both the Fast and Slow MA while using different lengths to create a traditional dual-MA system.

How do I access this tool? 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.