All indicators

MACDh with divergences & impulse system (overlayed on prices)

Jul 31, 2023

Static chart image
Dynamic OverlaysSignalsDivergencesMoving AveragesVolatility

The MACDh with divergences & impulse system (overlayed on prices) indicator identifies trend reversals through regular divergence detection between price action and the MACD histogram. By providing a comprehensive overlay that includes the Elder Impulse System and Keltner Channels, this tool helps traders identify momentum shifts and volatility boundaries directly on the price chart.

Usage

The Usage section focuses on identifying potential market tops and bottoms using divergence logic and momentum filtering.

  • Regular Divergences: The script plots lines and labels when price makes a higher high/lower low while the MACD histogram makes a lower high/higher low. These signals often precede trend reversals.
  • Impulse System: This feature colors the price bars based on the 13-period EMA and MACD histogram momentum.
    • Green Bars: Indicate both trend and momentum are rising (bullish control).
    • Red Bars: Indicate both trend and momentum are falling (bearish control).
    • Blue Bars: Indicate mixed signals where trend and momentum are not in sync.
  • Keltner Channels: Used as volatility-based envelopes to identify overextended price conditions relative to an exponential moving average.

Details

The indicator calculates regular bullish and bearish divergences using a customizable multi-criteria filtering system. Unlike standard oscillators, this script allows users to filter signals based on the "width" (horizontal distance between peaks) and "height" (vertical ratio between peaks) of the MACD histogram. This allows for a more refined signal that ignores noise in sideways markets. The Impulse System acts as a "censorship" filter; for instance, green bars suggest a trader should not look for short entries, while red bars suggest avoiding long entries.

Settings

MACD

  • Fast Length: The period for the shorter-term EMA in the MACD calculation.
  • Slow Length: The period for the longer-term EMA in the MACD calculation.
  • Signal Smoothing: The smoothing period for the MACD signal line.

MACD Histogram Divergences Criteria

  • Vertical deviation on Price peaks: Controls the minimum required vertical difference between price peaks to qualify as a divergence.
  • Vertical deviation on MACD Histogram peaks: Sets the ratio requirement between the first and second histogram peaks.
  • Divergence min/max width: Defines the lookback range (in bars) between the two peaks being compared.
  • Plot regular Bullish/Bearish divergences: Toggles the visibility of divergence lines and signals.
  • Delete Previous Cancelled Divergences: Clears historical lines that were invalidated by subsequent price action.

Other

  • Show Impulse System over prices: Toggles bar coloring based on the Elder Impulse System.
  • Fast/Slow Ema period: Adjusts the lookback for the optional overlay EMAs.
  • Plot ATR Channels: Toggles various Keltner Channel boundaries based on multiples of the Average True Range.

FAQ

How do I interpret the colored bars?

Green bars mean the trend and momentum are both up, red means both are down, and blue represents a neutral or transitioning state where they disagree.

What is the difference between temporary and confirmed signals?

Temporary signals appear as the divergence is forming, while confirmed signals are locked in once the MACD histogram crosses the zero line, confirming the completion of the pattern.

How can I access this tool?

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.