All indicators

Multi Color Normalized MACD + Candles (NMACD)

Jul 21, 2018

Static chart image
SignalsOscillatorsCandlestickDivergencesMoving Averages

The Multi Color Normalized MACD + Candles (NMACD) indicator provides a versatile approach to analyzing volatility, divergence, and relative momentum by offering both a normalized histogram and a unique candle-based visualization. It allows traders to compare momentum across different assets and timeframes more effectively than standard oscillators by scaling the MACD output relative to the moving average or price deviations.

Usage

The indicator can be used in two primary modes: standard MACD mode and Candle mode.

  • Standard Mode: Use the multi-color histogram to identify trend strength and exhaustion. Bright colors indicate strengthening momentum (rising histogram in an uptrend, falling in a downtrend), while faded colors indicate weakening momentum.
  • Candle Mode: When enabled, the indicator transforms the fast moving average into the price itself, effectively measuring the distance between price and the slow moving average. This creates an OHLC candle representation of the MACD.
  • Zero Crossings: In Candle mode, a zero-line crossing corresponds exactly to price crossing the slow moving average on the main chart.
  • Divergence Analysis: Candle mode allows for more precise divergence detection. Instead of comparing only the close price to the indicator, users can compare the high, low, and close of the candles simultaneously to identify hidden or standard divergences more accurately.

Details

This script implements several unique concepts:

  • Normalization: By dividing the raw MACD difference by the Slow MA or by price deviations, the indicator produces a normalized value. This removes the "asset price" bias, making the oscillator values comparable across different instruments (e.g., comparing a high-priced stock like BTCUSD to a lower-priced one).
  • Candle Visualization: Standard MACD calculates the difference between two averages. The candle mode here sets the fast length to zero, treating the price (Open, High, Low, Close) as the fast component. This allows for a full candlestick chart to be drawn within the oscillator pane.
  • Smoothing Options: Users can select from various Moving Average types (SMA, EMA, WMA, RMA, or TEMA) for the base calculations. Additionally, a Triple EMA smoothing length can be applied to the source data to filter out market noise before the MACD calculation begins.

Settings

Main Settings

  • Candle Mode: Toggle between the standard histogram/line view and the candle-based MACD visualization.
  • Normalize by: Choose the normalization method: "Slow MA", "Deviations", or "Disable".
  • Source: The price data used for calculations (e.g., Close, HLC3).
  • MA type: Select the internal moving average calculation method (Exponential, Triple EMA, Simple, Smoothed, or Weighted).
  • Slow Length: The lookback period for the slow moving average.
  • Fast Length: The lookback period for the fast moving average (disabled automatically in candle mode).
  • Signal Length: The smoothing period for the signal line. Setting this to 0 disables the signal line.
  • Triple EMA Smoothing Length: Applies pre-calculation smoothing to the source price. Set to 0 to disable.
  • Color Background Based on MACD Direction: When enabled, the plot area background changes color based on the MACD line's direction.

FAQ

How do I use the normalization feature?

You can select the "Slow MA" or "Deviations" option in the "Normalize by" setting. This scales the output, allowing you to compare the volatility and momentum of different assets regardless of their nominal price.

What is the benefit of the Candle Mode?

Candle Mode allows you to see the full price action (OHLC) relative to the slow moving average. This makes it significantly easier to spot divergences using highs and lows rather than just the close price.

How can I get access to this indicator?

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.