All indicators

Better MACD with clearer cross and histogram signals

Jul 6, 2018

Static chart image
SignalsOscillatorsMoving Averages

The Better MACD indicator provides an enhanced visual representation of the classic Moving Average Convergence Divergence, designed to offer clearer signals for trend direction and momentum shifts.

Usage

The Better MACD can be used to identify trend changes and momentum strength more efficiently than the standard version.

  • Crossover Markers: Whenever the MACD line crosses the Signal line, a circle marker is plotted directly on the line. This allows traders to pinpoint the exact moment of a crossover without needing to squint at converging lines.
  • Histogram Color Changes: The histogram changes color based on its momentum. When the absolute value of the histogram is increasing, it reflects strengthening momentum, whereas a color change occurs when the histogram value begins to decrease, signaling a potential slowdown in the current trend.

Details

This tool is built upon the standard MACD calculation, which involves subtracting a Slow Exponential Moving Average (EMA) from a Fast EMA to create the MACD line. A Signal line (an EMA of the MACD line) is then applied. The primary improvements in this version are:

  1. Visual Clarity: Improved plot styles for better visibility against various chart backgrounds.
  2. Momentum Logic: A specific color logic for the histogram that evaluates math.abs(hist[1]) < math.abs(hist) to highlight directional strength.
  3. Alert Optimization: Integrated alerts for both bullish crossovers and bearish crossunders.

Settings

  • Source: Determines the price data used for the EMA calculations (e.g., Close, Open, HL2).
  • Fast Length: The period for the shorter Exponential Moving Average.
  • Slow Length: The period for the longer Exponential Moving Average.
  • Signal Length: The smoothing period applied to the MACD line to create the Signal line.

FAQ

How do I interpret the histogram color changes? The color changes when the histogram's current absolute value is no longer increasing compared to the previous bar, indicating that the gap between the MACD and Signal lines is narrowing and momentum may be fading.

What do the circles on the lines represent? The circles highlight every instance where the MACD line and the Signal line cross, marking potential entry or exit points.

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.