All indicators

MacD Custom Indicator-Multiple Time Frame+All Available Options!

Apr 16, 2014

Static chart image
SignalsOscillatorsTime BasedMoving Averages

The MacD Custom Indicator-Multiple Time Frame+All Available Options! tool provides a comprehensive Moving Average Convergence Divergence (MACD) solution featuring multi-timeframe analysis and advanced visualization settings for improved trend momentum identification.

Usage

The Usage section focuses on how to leverage the multi-timeframe capabilities and visual cues to interpret market momentum. Users can apply this indicator to identify trend reversals, momentum shifts, and signal line crossovers across various chart resolutions.

Multi-Timeframe Analysis

By adjusting the "Use Current Chart Resolution" setting, users can project MACD data from higher timeframes (e.g., 1-hour or 4-hour) onto their lower timeframe execution charts (e.g., 5-minute). This allows for a "top-down" approach where traders ensure their local trades align with the macro momentum.

Momentum Identification

The histogram and line color changes provide immediate feedback on market state:

  • Histogram Colors: When "MacD Histogram 4 Colors" is enabled, the bars differentiate between increasing and decreasing momentum above and below the zero line, allowing for more granular entries.
  • Signal Cross Dots: Visual dots appear at the point of intersection between the MACD and Signal lines, highlighting potential entry or exit points without needing to squint at the line proximity.

Details

The script is a refactored version of the original work by @ChrisMoody, optimized for modern charting performance. It calculates the MACD by subtracting a Long Exponential Moving Average (EMA) from a Short EMA. A Signal Line is then derived from the Simple Moving Average (SMA) of that MACD line.

The indicator utilizes the request.security function to fetch data from different timeframes. The logic includes four-color histogram state detection:

  • Strong Up: Histogram is positive and rising.
  • Weak Up: Histogram is positive but falling.
  • Strong Down: Histogram is negative and falling.
  • Weak Down: Histogram is negative but rising.

Settings

  • Use Current Chart Resolution?: When checked, the indicator uses the timeframe of the active chart. When unchecked, it uses the timeframe specified in the "Use Different Timeframe" input.
  • Use Different Timeframe?: Specifies the timeframe for MACD calculations if the current resolution box is unchecked.
  • Source: Determines the price data used for calculations (default is Close).
  • Fast Length: The period for the shorter Exponential Moving Average.
  • Slow Length: The period for the longer Exponential Moving Average.
  • Signal Length: The period for the SMA of the MACD line.
  • Show MacD & Signal Line?: Toggles the visibility of the primary MACD and Signal lines.
  • Show Dots When MacD Crosses Signal Line?: Enables visual markers at the point of line crossovers.
  • Show Histogram?: Toggles the visibility of the momentum histogram.
  • Change MacD Line Color-Signal Line Cross?: If enabled, the MACD line changes color based on whether it is above or below the signal line.
  • MacD Histogram 4 Colors?: Enables advanced color coding for the histogram to show momentum strength.

FAQ

How do I use the Multi-Timeframe (MTF) feature? Uncheck the "Use Current Chart Resolution" box in the settings and select your desired higher timeframe (like 60 or 240) from the dropdown menu to see macro trends on your current chart.

What do the different colors on the histogram mean? Bright colors represent strong momentum (price moving quickly in the direction of the trend), while faded colors represent weakening momentum or potential retracements.

How do I access MacD Custom Indicator-Multiple Time Frame+All Available Options!? 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.