All indicators

MACD Color

May 19, 2020

Static chart image
SignalsOscillatorsMoving Averages

The MACD Color indicator provides a visual enhancement to the classic Moving Average Convergence Divergence oscillator, using dynamic color-coding on both the histogram and signal line to help traders quickly identify trend shifts and momentum changes.

Usage

The MACD Color tool is used to identify trend direction, momentum strength, and potential reversal points. By applying specific colors to the histogram and the signal line, it simplifies the interpretation of traditional MACD data.

  • Histogram Analysis: The histogram columns change color based on whether the MACD line is above or below zero, and whether it is currently rising or falling. A brightening color typically indicates strengthening momentum, while a fading color suggests weakening momentum.
  • Signal Line Transitions: The signal line changes color based on its slope. A green signal line indicates an upward trajectory, while a red signal line indicates a downward trajectory.
  • Crossovers: Traders can look for bullish crossovers (MACD crossing above the signal line) or bearish crossovers (MACD crossing below the signal line) to identify potential entry or exit points.

Details

The script calculates the MACD by subtracting a slow moving average from a fast moving average. A signal line is then derived from the MACD using a smoothing period.

Unlike the standard MACD, this version offers flexibility in the calculation method:

  • Oscillator Calculation: Users can choose between Exponential Moving Averages (EMA) or Simple Moving Averages (SMA) for the fast and slow components.
  • Signal Smoothing: The signal line can also toggle between EMA and SMA smoothing, allowing for different levels of sensitivity to price action.

Settings

Main Settings

  • Fast Length: Sets the period for the shorter moving average (default is 12).
  • Slow Length: Sets the period for the longer moving average (default is 26).
  • Source: Determines the price data used for calculations (e.g., Close, Open, High, Low).
  • Signal Smoothing: Adjusts the length of the signal line's moving average (default is 9).
  • Simple MA(Oscillator): When enabled, uses SMA instead of EMA for the fast and slow lengths.
  • Simple MA(Signal Line): When enabled, uses SMA instead of EMA for the signal line calculation.

FAQ

How do I interpret the histogram colors?

The colors are divided into four states: growing above zero (strong bullish), falling above zero (weakening bullish), falling below zero (strong bearish), and growing below zero (weakening bearish).

Can I use this for automated alerts?

Yes, the script includes built-in alert conditions for bullish and bearish crossovers between the MACD line and the signal line.

How do I access MACD Color?

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.