All indicators

MACD Divergence Fast

May 3, 2022

Static chart image
SignalsOscillatorsDivergencesMoving Averages

The MACD Divergence Fast indicator tool is designed to identify momentum shifts by detecting divergences between price action and the MACD diff line across multiple lookback periods simultaneously.

Usage

The tool identifies potential trend reversals by scanning for bullish and bearish divergences using lookback lengths of 5, 10, 20, 40, and 60 bars. When a divergence is detected, the script plots a line connecting the relevant peaks or troughs and adds a label.

To use this indicator effectively:

  • Wait for Confirmation: Divergences are labeled with "K not end" if the current candle is still open. It is recommended to wait for the bar to close to ensure the divergence remains valid.
  • Filter with Trend: Avoid taking bearish signals in a strong uptrend or bullish signals in a sharp downtrend. The most reliable signals often occur after price has made a double top or bottom.
  • Trade Management: A common approach is to place a stop loss below the recent pivot low for bullish trades or above the pivot high for bearish trades. If price exceeds these levels, the divergence is considered invalidated.
  • Color Coding: Active and valid divergences are shown in green (bullish) or red (bearish). If a detected divergence is invalidated by subsequent price action, the lines will turn grey.

Details

Unlike standard MACD indicators that use a single fixed lookback, this script processes five different lengths at once. This multi-length approach allows it to capture both short-term micro-divergences and broader cyclical shifts. The script also includes an "Enhanced Mode" which replaces the standard signal line with Bollinger Bands for the MACD diff line, helping users visualize volatility and extreme momentum extensions.

Settings

  • Fast Line Length: Sets the period for the fast Exponential Moving Average (default 12).
  • Slow Line Length: Sets the period for the slow Exponential Moving Average (default 26).
  • Smooth Line Length: Sets the period for the signal (DEA) line (default 9).
  • Enhanced Mode: A toggle to replace the DEA line with Bollinger Bands surrounding the MACD diff line.

FAQ

How do I interpret the "m" labels?

The "m" labels indicate a MACD divergence has been detected. If followed by "K not end," it means the signal is currently forming on the live bar and has not yet been confirmed by a bar close.

Why do some divergence lines turn grey?

Because this is a "fast" detection system, it identifies signals early. If the price movement continues in the direction of the original trend and breaks the pivot point, the divergence is invalidated and recolored to grey.

How can I access MACD Divergence Fast?

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.