All indicators

MACD Bands

Feb 25, 2021

Static chart image
Dynamic OverlaysSupport and ResistanceMoving Averages

The MACD Bands indicator projects the traditional MACD oscillator onto the price chart, allowing traders to visualize momentum and trend changes without occupying additional screen space below the price action.

Usage

The MACD Bands can be used similarly to the traditional MACD oscillator but with the added benefit of price-overlay context. Traders can identify trend strength and potential reversals through the following visual cues:

  • Trend Confirmation: When price is trading above the signal line and the cloud, it suggests a stronger bullish environment. Conversely, trading below them suggests bearish dominance.
  • Momentum Clouds: The width of the cloud represents the MACD value (the difference between the Fast and Slow MAs). The cloud color reflects the histogram state: green shades indicate positive momentum, while red shades indicate negative momentum.
  • Crossovers: A teal line (Fast MA) crossing above a maroon line (Slow MA) indicates a positive MACD value. The signal line (yellow/white by default) often acts as dynamic support or resistance during established trends.

Details

This tool implements the MACD calculation by plotting the Fast MA and Slow MA directly on the price chart. The Signal line is rendered as an offset of the Slow MA to maintain visual consistency with price levels. The script supports 10 different Moving Average types, including advanced options like ZLEMA (Zero Lag EMA), HMA (Hull Moving Average), and DEMA (Double EMA). This flexibility allows for varying degrees of responsiveness and smoothing depending on the trader's preference.

Settings

  • Source: Determines the price data used for calculations (e.g., Close, Open, HL2).
  • Fast Length: The period for the shorter moving average.
  • Slow Length: The period for the longer moving average.
  • Signal Length: The smoothing period for the signal line.
  • MA type: Selects the calculation method for the Fast and Slow MAs (EMA, SMA, WMA, VWMA, RMA, DEMA, TEMA, ZLEMA, HMA, ALMA).
  • Signal MA type: Selects the calculation method specifically for the Signal line.

FAQ

How do I interpret the cloud color?

The cloud turns green when the MACD histogram is positive and red when it is negative. Brightness variations indicate whether the histogram is increasing or decreasing in value (growing or falling momentum).

Can I use this for support and resistance?

Yes, the signal line and the boundary MAs often act as dynamic support and resistance levels, especially in trending markets.

How can I access this script?

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.