All indicators

MACD Advanced

Sep 23, 2021

Static chart image
SignalsOscillatorsDivergencesMoving Averages

The MACD Advanced indicator provides a comprehensive suite of signals by combining classic Moving Average Convergence Divergence logic with automated divergence detection to identify high-probability trend reversals and continuations.

Usage

The script is designed to filter out weak or false MACD signals by analyzing the context of the oscillator's position and the presence of price-oscillator divergences.

  • Strong Bullish/Bearish Signals: These occur when a MACD crossover/crossunder coincides with a regular divergence. This alignment suggests a powerful reversal point as both momentum and trend-exhaustion metrics agree.
  • Standard Signals: The indicator filters standard crossovers based on the Zero Line. Bullish crossovers are prioritized when below zero, and bearish crossunders are prioritized when above zero.
  • False Signal Filtering: The script automatically ignores crossovers that conflict with hidden divergences, as these often indicate a continuation of the prior move rather than a reversal.

Details

The MACD Advanced builds upon the traditional MACD calculation (Fast MA - Slow MA) but adds a sophisticated "Divergence Chaser" layer. It looks for four specific types of divergences:

  1. Regular Bullish: Lower lows in price with higher lows in the MACD.
  2. Hidden Bullish: Higher lows in price with lower lows in the MACD.
  3. Regular Bearish: Higher highs in price with lower highs in the MACD.
  4. Hidden Bearish: Lower highs in price with higher highs in the MACD.

By integrating these with the MACD line's relationship to the Signal line and the Zero line, the tool provides a refined output compared to the standard oscillator.

Settings

  • Fast Length: The period for the shorter moving average.
  • Slow Length: The period for the longer moving average.
  • Source: The price data source used for calculations (e.g., Close).
  • Signal Smoothing: The period for the MACD Signal line.
  • Oscillator/Signal MA Type: Choose between SMA or EMA for the various moving average components.
  • Divergence Checker Period: The lookback window used for divergence detection.
  • Pivot Lookback Right/Left: Determines the strength and confirmation period for pivot points used in divergence.
  • Max/Min of Lookback Range: Defines the distance between peaks/troughs to be considered for a valid divergence.

FAQ

How do I access MACD Advanced?

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

What makes a signal "Strong"?

A signal is labeled "Strong" when a MACD crossover occurs at the exact same time a regular divergence is confirmed, indicating high conviction.

Can I change the moving average types?

Yes, the settings allow you to toggle between SMA and EMA for both the main oscillator and the signal line smoothing.

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.