MACD Split Colors
Mar 27, 2015

The MACD Split Colors indicator provides a visual enhancement to the standard Moving Average Convergence Divergence (MACD) by applying distinct colors to positive and negative histogram values for improved trend clarity.
Usage
The Usage section focuses on identifying trend momentum and potential reversals through the relationship between the MACD line, signal line, and the split-color histogram.
- Momentum Identification: The histogram displays bars above the zero line in one color (e.g., green) and bars below the zero line in another (e.g., red). This allows traders to quickly identify whether the current momentum is bullish or bearish relative to the signal line.
- Crossovers: A common usage involves looking for crossovers between the MACD line and the Signal line. A crossover above the signal line suggests bullish momentum, while a crossunder suggests bearish momentum.
- Zero Line Crosses: Traders can also monitor when the MACD line crosses the zero level, indicating a change in the relationship between the fast and slow exponential moving averages.
Details
The script calculates the MACD line by subtracting a Slow EMA from a Fast EMA. A Signal line is then derived from a Simple Moving Average (SMA) of the MACD line. The histogram represents the difference between the MACD line and the Signal line.
To achieve the "split color" effect, the script separates the histogram into two distinct calculation components:
- Positive Histogram: Values greater than zero, highlighting periods where the MACD line is above the Signal line.
- Negative Histogram: Values less than zero, highlighting periods where the MACD line is below the Signal line.
Settings
Inputs
- Source: Determines the price data used for the calculations (default is Close).
- Fast Length: The period for the short-term Exponential Moving Average (default is 12).
- Slow Length: The period for the long-term Exponential Moving Average (default is 26).
- Signal Length: The period for the SMA of the MACD line (default is 9).
FAQ
How do I access MACD Split Colors?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the difference between this and the standard MACD?
The primary difference is the visual presentation of the histogram, which is split into separate plots for positive and negative values, making it easier to distinguish between bullish and bearish momentum shifts.
Does this indicator include alerts?
Yes, the indicator includes built-in alerts for MACD/Signal line crossovers and MACD Zero line crosses to help you stay notified of trend changes.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.