All indicators

MACD Remastered

Nov 6, 2025

Static chart image
SignalsOscillatorsDivergencesMoving AveragesVolatility

The MACD Remastered indicator provides a robust version of the classic Moving Average Convergence Divergence (MACD) oscillator, featuring a confirmed pivot-based divergence engine and optional Bollinger Band signal channels. It is designed to reduce false signals by validating momentum paths between pivots and ensuring signals only trigger after a specific confirmation window.

Usage

The indicator is used to identify trend momentum shifts and potential reversals through classical MACD mechanics and advanced divergence detection.

  • Momentum Analysis: Use the color-coded histogram to determine trend strength. Columns above zero indicate positive momentum, while shifts in color highlight acceleration or deceleration.
  • Divergence Trading: The script identifies four types of divergence:
    • Regular Bullish/Bearish: Indicates potential trend reversals.
    • Hidden Bullish/Bearish: Indicates potential trend continuation.
  • Signal Bands: Enable Bollinger Bands around the signal line to visualize volatility compression and expansion directly within the oscillator pane.
  • Main Chart Context: Optional triangles can be projected onto the main price chart to provide immediate visual context for divergence signals detected on the MACD.

Details

The script improves upon standard MACD implementations by using a confirmed pivot logic. A pivot is only established after a defined number of bars (Pivot Right) have passed, preventing "repainting" of signals on active candles. Furthermore, a "line-of-sight" clearance check traverses the histogram path between two pivots; if the histogram price action contradicts the divergence slope at any point, the signal is rejected to filter out noise.

Settings

MACD Settings

  • Oscillator MA Type: Choose between SMA or EMA for the fast and slow MACD components.
  • Fast/Slow Length: Periods used for the MACD calculation.
  • Source: The price input (e.g., Close, HL2).
  • Calculate Divergence: Toggles the divergence detection engine.

Smoothing

  • Signal MA Type/Length: Determines how the MACD line is smoothed to create the Signal line.
  • Bollinger Bands: Toggles and configures the length and standard deviation of the bands surrounding the Signal line.

Divergence (robust)

  • Pivot Left/Right: The number of bars required to confirm a swing high or low.
  • Min/Max Bars Between Pivots: Defines the valid lookback window for identifying divergence.
  • Detect Hidden: Toggles the detection of hidden divergence patterns.
  • Draw Lines: Toggles visual connector lines on the oscillator.

FAQ

How do I interpret the histogram colors? Darker colors represent accelerating momentum in the current direction (rising above zero or falling below zero), while lighter colors indicate momentum is slowing down.

Why does the divergence signal appear a few bars late? The script uses a "Pivot Right" confirmation setting. This ensures the pivot is a valid local peak or trough, significantly reducing false signals at the cost of slight latency.

How can I access MACD Remastered? 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.