All indicators

Moving Average Bundle

Mar 18, 2018

Static chart image
SignalsMoving Averages

The Moving Average Bundle indicator provides a comprehensive toolkit for technical analysis by combining up to three customizable moving average lines into a single script to optimize chart space and comparative analysis. This tool allows users to plot various smoothing methods simultaneously, facilitating the identification of trend shifts and momentum across different time horizons.

Usage

The Usage section describes how the script can be used, particularly for comparing different smoothing techniques or identifying trend crossovers. Users can enable up to three individual "Filters" (moving averages), each with its own independent calculation method, length, and source.

  • Trend Analysis: By setting three different lengths (e.g., Short, Medium, Long), users can identify the prevailing market trend and potential reversals when shorter averages cross over longer ones.
  • Recursive Calculations: Unique to this tool is the ability to use one filter as the input for another. For example, Filter 2 can be set to use Filter 1 as its price source, allowing for "double smoothing" or complex derivative calculations.
  • Visual Comparisons: The script includes optional background fills between the lines, which can help visualize the "spread" or "squeeze" between different moving average periods.

Details

The script includes a wide variety of built-in averaging methods, ranging from standard statistical measures to more advanced filters:

  • Standard Averages: SMA, EMA, WMA, RMA, VWMA.
  • Advanced Filters: ALMA (Arnaud Legoux), Hull Moving Average, DEMA (Double Exponential), and LSMA (Least Squares).
  • Statistical/Adaptive: Highest/Lowest price over a period, Percentile-based filters, and Lag-Adaptive filters.
  • Signal Processing: Laguerre filters, and SuperSmoother (2-pole and 3-pole) variations.

The indicator is optimized for alerts, supporting crossover and crossunder detections between any of the three active filters.

Settings

Filter 1, 2, & 3 Settings

  • Price Source: Determines the input data (Open, High, Low, Close, etc.). Filters 2 and 3 can also use previous filter outputs as their source.
  • Type: Selects the mathematical model for the moving average (e.g., SMA, EMA, Hull, etc.).
  • Length: Sets the lookback period for the calculation.
  • Plot Offset: Shifts the visual line forward or backward in time.
  • Plot Show: Toggles the visibility of the specific line on the chart.

Global & Fill Settings

  • Fill (1 and 2, 2 and 3, 1 and 3): Enables a background color between the specified lines when active.
  • ALMA Offset/Sigma: Specific controls for the Arnaud Legoux Moving Average to adjust smoothness and responsiveness.
  • Lag Adapt Perc Length/Percentile: Parameters for the adaptive logic in the Lag-Adaptive filter.
  • LSMA Offset: The offset used specifically for the Least Squares Moving Average linear regression calculation.

FAQ

How many moving averages can I show at once? You can display up to three distinct moving average lines, each with independent settings and calculation types.

Can I create a "Moving Average of a Moving Average"? Yes, by setting the "Price Source" of Filter 2 to "f1" (Filter 1), the script will calculate the second average based on the results of the first.

How do I get access to the Moving Average Bundle? 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.