All indicators

MACD + RSI

Aug 15, 2018

Static chart image
SignalsOscillatorsMoving Averages

The MACD + RSI indicator combines two of the most popular momentum oscillators into a single view to help traders identify trend direction and potential overextended market conditions simultaneously.

Usage

The tool is primarily used to identify trend shifts and momentum exhaustion. Traders look for the MACD line crossing above or below the Signal line to determine trend changes, while the histogram provides a visual representation of momentum strength. Simultaneously, the RSI component highlights overbought (above 70) and oversold (below 30) levels, allowing users to confirm if a MACD crossover is occurring during an extreme price extension.

By combining these two metrics, users can filter out weak signals; for example, a bullish MACD crossover may carry more weight if it occurs while the RSI is rising from an oversold state.

Details

This script integrates the standard Moving Average Convergence Divergence (MACD) logic with the Relative Strength Index (RSI).

  • MACD Logic: Calculated by subtracting a 26-period Exponential Moving Average (EMA) from a 12-period EMA. A 9-period EMA of this difference acts as the Signal line.
  • RSI Logic: Utilizes a 14-period Relative Moving Average (RMA) of price gains versus losses to scale price momentum between 0 and 100.
  • Visuals: The indicator plots both tools in the same pane, with the MACD histogram colored to reflect strengthening or weakening momentum and RSI levels highlighted with a background fill.

Settings

RSI Settings

  • RSI Length: Determines the number of bars used to calculate the Relative Strength Index. Higher values result in a smoother, less reactive line.

MACD Settings

  • MACD Fast Length: The shorter EMA period used for the MACD line calculation.
  • MACD Slow Length: The longer EMA period used for the MACD line calculation.
  • MACD Signal Length: The smoothing period applied to the MACD line to create the Signal line.

FAQ

How do I interpret the MACD histogram colors?

Bright colors represent increasing momentum (the histogram is moving further from the zero line), while faded colors indicate that momentum is beginning to slow down or contract.

Can I set alerts for specific conditions?

Yes, the script includes built-in alert triggers for MACD crossovers (bullish and bearish) as well as RSI breaches of the overbought (70) and oversold (30) levels.

How can I access MACD + RSI?

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.