RSI + MACD
Apr 18, 2022

The RSI + MACD indicator combines two of the most widely used technical analysis tools into a single, unified pane to save chart space and provide direct visual confluence. By normalizing the MACD histogram to the RSI's 0-100 scale, traders can perform side-by-side comparisons of momentum and trend strength more efficiently.
Usage
The RSI + MACD tool is designed to identify potential entry and exit points by looking for alignment between trend momentum and overbought/oversold conditions.
- Confluence Trading: A common strategy involves looking for RSI to reach extreme levels (overbought above 70 or oversold below 30) while monitoring the MACD histogram for reversals. For example, entering a long position when RSI is oversold and the MACD histogram crosses above its midline can provide higher conviction than using either signal in isolation.
- Visual Integration: Because the MACD is re-scaled to fluctuate around the RSI's 50-level midpoint, users can quickly see if a rising RSI is supported by positive MACD momentum or if there is a divergence between the two.
- Exit Timing: The indicator can be used to time exits by identifying when one component begins to weaken even if the other remains in a trend.
Details
The script calculates a standard Relative Strength Index (RSI) and a Moving Average Convergence Divergence (MACD) based on user-defined lengths. To ensure both indicators are readable in the same pane, the MACD histogram is normalized. It calculates the highest and lowest histogram values over a 2048-bar lookback and scales the current value to fit within the RSI's range, centered at 50. This allows the MACD's "zero line" to align perfectly with the RSI's "neutral" level.
Settings
RSI
- RSI Length: Determines the lookback period used for the RSI calculation (default is 14).
MACD
- Fast Length: The period for the shorter moving average in the MACD calculation.
- Slow Length: The period for the longer moving average in the MACD calculation.
- Signal Smoothing: The period for the signal line smoothing.
- Oscillator MA Type: Choose between Simple Moving Average (SMA) or Exponential Moving Average (EMA) for the MACD oscillator components.
- Signal Line MA Type: Choose between SMA or EMA for the smoothing of the signal line.
FAQ
How do I use the normalized MACD histogram?
The MACD histogram is scaled to fluctuate around the 50 level. When the histogram area is green and above 50, it represents positive momentum; when it is red and below 50, it represents negative momentum.
Can I change the moving average types?
Yes, the settings allow you to toggle between SMA and EMA for both the MACD oscillator and the signal line smoothing to better fit your specific strategy.
How can I access RSI + MACD?
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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.