All indicators

MACD BB - 3 colors

Feb 8, 2021

Static chart image
SignalsOscillatorsChannelsMoving AveragesVolatility

The MACD BB - 3 colors indicator provides a visual representation of momentum by applying Bollinger Bands to a MACD line, utilizing three distinct colors to signal trend volatility and breakouts.

Usage

The MACD BB - 3 colors tool is used to identify periods of high momentum or potential exhaustion based on the relationship between the MACD line and its volatility bands.

  • Over Band: When the MACD line is above the upper band, the dots turn green, indicating strong bullish momentum or an overextended state.
  • Under Band: When the MACD line is below the lower band, the dots turn red, indicating strong bearish momentum or an oversold state.
  • Inside Band: When the MACD line is within the bands, the dots match the chart's foreground color, suggesting a period of normal volatility or consolidation.

Traders can use crossovers of the upper and lower bands as signals for potential trend continuation or reversals.

Details

The script calculates a standard Moving Average Convergence Divergence (MACD) by subtracting a slow Exponential Moving Average (EMA) from a fast EMA. Instead of plotting the standard MACD histogram or signal line, it applies a Bollinger Band calculation directly to the MACD value itself. This creates dynamic thresholds that expand and contract based on the recent volatility of the MACD, providing a more responsive context than fixed level oscillators.

Settings

MACD & BB Settings

  • Source: Determines the input price source used for the MACD calculation (default is hl2).
  • BB Periods: The lookback period used to calculate the Simple Moving Average and Standard Deviation for the Bollinger Bands.
  • Deviations: Sets the multiplier for the Standard Deviation to determine the width of the bands.
  • Fast Length: The period for the shorter Exponential Moving Average in the MACD calculation.
  • Slow Length: The period for the longer Exponential Moving Average in the MACD calculation.

FAQ

How do I use the MACD BB - 3 colors for alerts?

The script includes built-in alert conditions that trigger when the MACD line crosses above the upper band or below the lower band, which can be configured through the TradingView alert menu.

What is the significance of the zero line?

The zero line represents where the Fast EMA and Slow EMA are equal. While the bands provide volatility context, the position relative to the zero line indicates the underlying trend direction.

How can I access 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.