MACD Divergence added in CM_MacD_Ult_MTF
Oct 13, 2018

The MACD Divergence added in CM_MacD_Ult_MTF indicator provides a multi-timeframe Moving Average Convergence Divergence (MACD) solution equipped with automated divergence detection to help traders identify potential trend reversals.
Usage
The indicator can be used to identify momentum shifts and trend exhaustions through several visual cues:
- Divergence Detection: The script automatically highlights bullish and bearish divergences between the price and the MACD histogram. Bullish divergences are marked with green background highlights, while bearish divergences are marked with red background highlights.
- Multi-Timeframe Analysis: Users can plot the MACD from a higher timeframe onto their current chart to gain a broader perspective on momentum without switching tabs.
- Crossovers: The indicator plots circles when the MACD line crosses the Signal line, identifying potential entry or exit points.
- Histogram Analysis: A four-color histogram helps distinguish between strengthening and weakening momentum in both bullish and bearish territories.
Details
This tool is an extension of the CM_MacD_Ult_MTF concept originally developed by ChrisMoody. It calculates the difference between a Fast EMA and a Slow EMA to create the MACD line, followed by a Signal line (SMA of the MACD). The divergence logic tracks the peaks and troughs of the MACD histogram relative to the price action (Divergence Source) to find discrepancies that often precede price reversals.
Settings
Timeframe Settings
- Use Current Chart Resolution?: When enabled, the indicator uses the timeframe of the current chart.
- Use Different Timeframe?: Allows the selection of a specific timeframe for the MACD calculation if the checkbox above is disabled.
MACD Settings
- Fast Length: Sets the period for the shorter Exponential Moving Average (default 12).
- Slow Length: Sets the period for the longer Exponential Moving Average (default 26).
- Signal Length: Sets the smoothing period for the Signal Line (default 9).
- MACD Source: Determines the price data used for the MACD calculation.
Divergence Settings
- Divergence Source: Determines which price source (e.g., Close, High/Low) is compared against the histogram to find divergences.
Visuals
- Show MacD & Signal Line?: Toggles the visibility of the primary MACD and Signal lines.
- Show Dots When MacD Crosses Signal Line?: Toggles the plot of circles at crossover points.
- Show Histogram?: Toggles the display of the momentum histogram.
- Change MacD Line Color: Changes the MACD line color based on whether it is above or below the Signal line.
- MacD Histogram 4 Colors?: Enables a more detailed color scheme for the histogram to show momentum acceleration/deceleration.
FAQ
How do I interpret the background colors?
A green background indicates a Bullish Divergence (price making lower lows while the MACD histogram makes higher lows), and a red background indicates a Bearish Divergence (price making higher highs while the MACD histogram makes lower highs).
Can I use this for scalping on lower timeframes?
Yes, the indicator supports all timeframes. You can also use the Multi-Timeframe setting to view 1-hour MACD momentum while trading on a 5-minute chart.
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 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.