All indicators

MACD + RSI

Feb 12, 2019

Static chart image
SignalsOscillatorsMoving Averages

The MACD + RSI indicator combines two of the most popular momentum oscillators into a single unified interface to provide a comprehensive view of trend strength and reversal points. By overlaying the Relative Strength Index (RSI) onto the Moving Average Convergence Divergence (MACD) pane, traders can easily identify confluence between trend momentum and overbought or oversold conditions.

Usage

The tool is designed to highlight trade opportunities through the following methods:

  • Trend Momentum: Use the MACD line and Signal line crossovers to determine potential entry and exit points. The histogram provides a visual representation of the distance between the MACD and Signal lines, indicating accelerating or decelerating momentum.
  • Overbought/Oversold Identification: The scaled RSI plot allows you to monitor relative strength alongside MACD. When the RSI moves toward the upper or lower bands, it signals potential exhaustion in the current trend.
  • Confluence Trading: Look for instances where a MACD crossover occurs simultaneously with an RSI reversal from extreme levels. For example, a bullish MACD crossover paired with an RSI rising from its lower band can offer a stronger signal than either indicator alone.

Details

This script executes both the standard MACD and RSI calculations. To ensure both indicators are visible and usable within a single pane, the RSI is dynamically scaled and offset.

  • MACD: Calculated using the difference between a fast and slow moving average (EMA or SMA). A signal line is then applied to this difference.
  • RSI: Calculated using the Relative Moving Average (RMA) of price changes over a specified period.
  • Scaling: The RSI values (typically 0-100) are normalized and shifted so they oscillate around the MACD's zero-line area, allowing for clear visual comparison without distorting the MACD histogram or lines.

Settings

MACD Settings

  • Source: Determines the price data used for calculations (e.g., Close, Open, High, Low).
  • MACD Fast Length: The period for the shorter moving average.
  • MACD Slow Length: The period for the longer moving average.
  • MACD Signal Smoothing: The period used to calculate the Signal line from the MACD line.
  • MACD Simple MA (Oscillator): If enabled, uses SMA instead of EMA for the MACD calculation.
  • MACD Simple MA (Signal Line): If enabled, uses SMA instead of EMA for the Signal line calculation.

RSI Settings

  • RSI Length: The lookback period for the RSI calculation.

FAQ

How do I interpret the scaled RSI?

The RSI has been scaled to fit the MACD pane. While the absolute values differ from a standard 0-100 scale, the visual movement and the bands provided represent the traditional overbought and oversold thresholds.

Are alerts included?

Yes, the script includes built-in alerts for MACD/Signal line crossovers and RSI entries into extreme levels (overbought/oversold).

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.