All indicators

MACD Divergence MultiTimeFrame

Apr 18, 2016

Static chart image
SignalsOscillatorsDivergences

The MACD Divergence MultiTimeFrame indicator identifies regular and hidden divergences across three distinct timeframes within a single pane to help traders spot potential trend reversals and continuations.

Usage

This tool is designed to be used on a 1H chart by default, providing visual cues for divergences occurring on the 1H, 4H, and 1D intervals. The indicator plots three MACD lines and labels them with specific codes:

  • R1, R2, R3: Represent Regular Divergences for the 1H, 4H, and 1D timeframes respectively.
  • H1, H2, H3: Represent Hidden Divergences for the 1H, 4H, and 1D timeframes respectively.
  • Color Coding: Green labels signify bullish signals, while maroon (red) labels signify bearish signals.
  • Gray Circles: Located on the 4H MACD line, these provide additional pivot points that can be used by traders to confirm Elliott Wave count changes.

Details

The script calculates three separate MACD instances using expanded lengths to simulate higher timeframes on a lower timeframe chart. It uses a lookback mechanism to identify price pivots (higher highs/lower lows) and compares them with the corresponding MACD values. Regular divergence suggests a potential trend reversal, while hidden divergence typically suggests trend continuation. This implementation is based on the divergence logic established by RicardoSantos.

Settings

  • Source: Determines the price data used for the MACD calculations (default is Close).
  • Fast/Slow Length 1: Controls the MACD calculation for the base timeframe (typically 1H).
  • Fast/Slow Length 2: Controls the MACD calculation for the intermediate timeframe (simulating 4H).
  • Fast/Slow Length 3: Controls the MACD calculation for the higher timeframe (simulating 1D).

FAQ

How do I access MACD Divergence MultiTimeFrame?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What chart timeframe should I use?

The default settings are optimized for a 1H chart. If you use it on other timeframes, you must adjust the length inputs to match the desired timeframe ratios.

What is the difference between R and H labels?

R stands for Regular Divergence, which indicates a possible reversal of the current trend. H stands for Hidden Divergence, which often signals that the current trend is likely to continue.

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.