Multi Time Frame Moving Averages

Dec 14, 2020

Static chart image
Time Based
Moving Averages

The Multi Time Frame Moving Averages indicator provides a comprehensive solution for tracking up to six different timeframe moving averages simultaneously on a single chart. This tool eliminates the need for multiple tabs by consolidating popular moving average types and multi-timeframe analysis into one overlay, offering enhanced trend visibility across various horizons.

Usage

The Usage section describes how the script can be used, particularly in identifying trend alignment across different periods. Users can select from a wide array of moving average types, such as EMA, SMA, or Hull MA, and apply them across user-defined timeframes (e.g., 6-hour, 12-hour, Daily).

A key feature is the "Average of 4 lengths" option. When enabled, the indicator calculates the mean value of four distinct lengths (defaulting to 25, 50, 100, and 200), providing a smoothed aggregate trend line. This helps in filtering out noise from a single period. Additionally, the forecast feature allows users to project the current timeframe's moving average using either a flat projection or linear regression, aiding in anticipating potential trend shifts.

Details

The script executes by fetching data from higher timeframes using the request.security function. It supports 19 different moving average variants, ranging from standard calculations like SMA and EMA to more complex filters like the Blackman Filter, KAMA, and VIDYA.

For the forecasting logic, the indicator offers two modes:

  • Flat: Assumes future prices remain equal to the current price.
  • Linreg: Uses a linear regression of a specified length to project future price points before incorporating them into the moving average calculation.

The indicator also includes internal logic to prevent visual clutter by checking if the requested timeframe is compatible with the current chart resolution.

Settings

General Settings

  • Source: Determines the input data (e.g., Close, Open) used for the calculations.
  • Type: Selects the specific moving average algorithm (e.g., DEMA, TEMA, VWAP, LSMA).
  • Use custom length?: If enabled, the indicator uses the single "Custom Length" input for calculations.
  • Custom Length: The period length used when "Use custom length" is active.
  • Use Average of 4 lengths?: When checked, the indicator averages the outputs of the four lengths specified below.
  • #1 - #4: The four distinct period lengths used for the averaging feature.

Timeframe Settings

  • Show current/1st–6th Timeframe: Toggles the visibility of the moving average for the specific timeframe.
  • 1st–6th Timeframe: Sets the resolution for the corresponding multi-timeframe line (e.g., 1D, 1W).

Forecast Settings

  • Show Forecast: Enables or disables the projection lines for the current timeframe.
  • MA Forecast Type: Chooses between "flat" (constant price) or "linreg" (linear regression) for the projection.
  • # of candles to use in linear regression: Sets the lookback period for the linear regression forecast.

FAQ

How can I see moving averages from different timeframes simultaneously?
You can enable the specific timeframe slots in the settings (1st through 6th) and select the desired resolution for each. The indicator will then fetch and plot those values on your current chart.

What is the benefit of the "Average of 4 lengths" feature?
This feature combines four different moving average periods into one value, creating a robust trend indicator that reacts to multiple levels of market support and resistance simultaneously.

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 access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.