Multi Timeframe Moving Averages
Nov 27, 2019

The Multi Timeframe Moving Averages indicator allows traders to plot a Simple or Exponential Moving Average from a specified higher timeframe onto their current chart to act as a trend filter and identify key support or resistance levels.
Usage
The Usage section focuses on how to integrate higher timeframe trend data into lower timeframe execution. This tool is primarily used as a directional filter; for example, a trader might only look for long positions on a 15-minute chart if the price remains above a Daily 200-period SMA.
Key applications include:
- Trend Alignment: Quickly determine if current price action is in sync with the primary trend of a higher timeframe.
- Dynamic Support and Resistance: Higher timeframe moving averages often act as significant hurdles for price on lower timeframes, providing potential areas for bounces or breakouts.
- Signal Filtering: Use the higher timeframe MA to filter out counter-trend signals from other indicators.
Details
The script utilizes the request.security function to pull data from a different timeframe than the one currently active on the chart. It offers two primary calculation methods: Simple Moving Average (SMA) and Exponential Moving Average (EMA). The script is designed to handle timeframe gaps smoothly, ensuring the higher timeframe line remains visible across all lower timeframe bars. Additionally, the indicator includes built-in alert conditions for price crossovers and crossunders relative to the multi-timeframe line, facilitating real-time monitoring. Original code by @millerrh.
Settings
- Moving Average Time Frame: Sets the timeframe (e.g., Daily, Weekly, 4-Hour) from which the moving average is calculated.
- Moving Average Type: Allows the user to toggle between a Simple Moving Average (SMA) and an Exponential Moving Average (EMA).
- Moving Average Period: Determines the number of bars used in the calculation (e.g., 50, 100, or 200).
FAQ
How does a multi-timeframe moving average help with trading? It provides context by showing where the price stands relative to a major trend without the need to constantly switch between different chart tabs.
Can I use this indicator on any asset? Yes, the indicator works on all asset classes available on the platform, including stocks, forex, and crypto, as long as the selected higher timeframe has available data.
How do I access the Multi Timeframe Moving Averages 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.