All indicators

Triple MA Forecast

Sep 25, 2018

Static chart image
SignalsForecastingMoving Averages

The Triple MA Forecast indicator projects the future trajectory of three moving averages by simulating price evolution based on current market data or trend regressions. This tool is designed to help traders anticipate potential moving average crossovers and slope changes before they occur on the chart.

Usage

The Usage section describes how the script can be used to visualize potential trend shifts. Traders can utilize this indicator to see where a short, medium, and long-term Simple Moving Average (SMA) will likely reside in the next three periods.

For example, if a trader is monitoring a potential "Golden Cross," they can use the forecast plots (displayed as circles) to determine if the current price action is sufficient to trigger the crossover in the coming bars.

The interpretation of the forecast depends heavily on the selected MA Forecast Type:

  • Flat: Assumes that future prices will remain identical to the most recent price. This is useful for seeing the "time decay" effect as old prices drop out of the MA calculation.
  • Linreg: Uses a linear regression of the last n periods to project future prices. This is more dynamic as it accounts for recent momentum.

Details

The Triple MA Forecast calculates three distinct SMA lengths, traditionally set to short, medium, and long-term intervals (defaulted to 7, 30, and 50). The forecasting logic functions by removing the oldest data points from the moving average window and replacing them with predicted values.

The tool provides three forecast points into the future. Each point represents the projected MA value for T+1, T+2, and T+3. By visualizing these points, the script eliminates the need for manual calculations or measuring back bars to estimate how specific price movements will impact the indicator's slope. The original concept for this implementation was inspired by methods used by trader Tone Vays to gauge moving average momentum.

Settings

  • Source: Determines the price data used for the MA calculations (e.g., Close, Open, HL2).
  • Include current unclosed candle: If enabled, the script includes the real-time fluctuating candle in its calculations.
  • MA Forecast Type: Selects between "flat" (static price) or "linreg" (linear regression trend) for future price projections.
  • # of candles to use in linear regression: Sets the lookback period for the linear regression forecast if that mode is selected.
  • Plot Short/Mid/Long MA: Toggles the visibility of the primary moving average lines.
  • Short/Mid/Long MA Len: Defines the period length for each of the three moving averages.

FAQ

How do I interpret the circles at the end of the lines? The circles represent the forecasted values for the moving averages over the next three bars based on your selected forecast type (Flat or Linear Regression).

Can I use this for crossover alerts? Yes, the script includes built-in alert conditions for when the Short MA crosses over or under the Mid and Long MAs.

How can I access the Triple MA Forecast? 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.