All indicators

MTF EMA

Jul 30, 2019

Static chart image
Support and ResistanceSignalsMoving Averages

The MTF EMA indicator enables traders to track long-term trend direction and dynamic support or resistance levels by plotting an Exponential Moving Average from a higher timeframe directly onto the current chart.

Usage

The Usage section describes how the script can be used to improve market analysis. This tool is primarily used to maintain perspective on higher-timeframe trends while trading on lower-timeframe charts.

Trend Identification

By selecting a higher resolution (e.g., Daily or 4-Hour) via the settings, traders can use the MTF EMA as a filter for their trades. If the price is trading above the MTF EMA, the higher-timeframe trend is considered bullish; if below, it is considered bearish.

Dynamic Support and Resistance

The moving average acts as a dynamic level where price may find support or face resistance. Traders often look for price action reversals or consolidations around the MTF EMA line to identify potential entry or exit points.

Crossover Alerts

The script includes built-in alert functionality for price crossovers. An alert is triggered when the current price closes above or below the MTF EMA, assisting traders who cannot monitor the charts constantly.

Details

The MTF EMA utilizes the request.security function in Pine Script to fetch data from a user-defined resolution. This allows the indicator to calculate an Exponential Moving Average (EMA) based on the historical data of a higher timeframe and project it onto the current chart.

The Exponential Moving Average differs from a Simple Moving Average (SMA) by placing more weight on recent price data, making it more responsive to recent market shifts while still providing a smoothed trendline. The script was originally designed to bridge gaps in default timeframe selections (such as the 4-hour resolution) and provide a visual anchor for multi-timeframe analysis.

Settings

  • Length: Defines the number of periods used to calculate the Exponential Moving Average.
  • Source: Determines which price data point is used for the calculation (e.g., Close, Open, High, Low).
  • Offset: Allows the user to shift the EMA line forward or backward on the horizontal axis.
  • Resolution: Specifies the timeframe from which the EMA data is pulled (e.g., 240 for 4-hour, D for Daily).

FAQ

What is the benefit of using a Multi Time Frame EMA?

Using an MTF EMA allows you to stay aware of macro market trends without having to switch between different chart tabs. This helps in avoiding trades that go against the primary trend of a higher timeframe.

Can I set the indicator to any timeframe?

Yes, the Resolution setting allows you to input various timeframes such as minutes (e.g., "60"), hours ("240"), or days ("D"), depending on your specific strategy requirements.

How do I access the MTF EMA?

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.