Indicator · Pine Script v5 · Own pane

Stella's MACD + RSI Combo

by stella-entry

Stella's MACD + RSI Combo plots both the Moving Average Convergence Divergence oscillator and the Relative Strength Index in a separate chart pane.

View on GitHub

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code49
Settings6inputs
LicenceMIT
Last update8 months ago22 Feb 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

49 lines of Pine Script v5 from indicators/macd-rsi-combo.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

macd-rsi-combo.pine
//@version=5
indicator("Stella's MACD + RSI Combo", shorttitle="MRSI", overlay=false)

// MACD + RSI Combination Indicator
// Combines momentum (MACD) with overbought/oversold (RSI)

// MACD Settings
fast_len = input(12, "MACD Fast Length")
slow_len = input(26, "MACD Slow Length")
sig_len = input(9, "MACD Signal Length")

// RSI Settings
rsi_len = input(14, "RSI Length")
rsi_ob = input(70, "RSI Overbought")
rsi_os = input(30, "RSI Oversold")

// Calculate MACD
[macd_line, signal_line, hist] = ta.macd(close, fast_len, slow_len, sig_len)

// Calculate RSI
rsi = ta.rsi(close, rsi_len)

// Combined signals
bullish = macd_line > signal_line and rsi < rsi_ob
bearish = macd_line < signal_line and rsi > rsi_os
strong_bull = macd_line > signal_line and rsi > rsi_ob and rsi < 80
strong_bear = macd_line < signal_line and rsi < rsi_os and rsi > 20

// Plot MACD
plot(macd_line, "MACD", color=color.blue)
plot(signal_line, "Signal", color=color.orange)
plot(hist, "Histogram", style=plot.style_columns,
     color=hist > 0 ? color.green : color.red)

// Plot RSI
hline(rsi_ob, "Overbought", color=color.red, linestyle=hline.style_dashed)
hline(50, "Midline", color=color.gray)
hline(rsi_os, "Oversold", color=color.green, linestyle=hline.style_dashed)
plot(rsi, "RSI", color=color.purple)

// Signals
plotshape(bullish, "Bullish", shape.triangleup, location.bottom, color.green, size=size.small)
plotshape(bearish, "Bearish", shape.triangledown, location.top, color.red, size=size.small)

// Alerts
alertcondition(bullish, "Bullish Signal", "MACD bullish + RSI healthy")
alertcondition(bearish, "Bearish Signal", "MACD bearish + RSI healthy")
alertcondition(strong_bull, "Strong Bull", "MACD + RSI overbought momentum")
alertcondition(strong_bear, "Strong Bear", "MACD + RSI oversold momentum")

Overview

Stella's MACD + RSI Combo evaluates momentum by comparing the MACD line against its signal line alongside RSI overbought and oversold thresholds. Triangle shapes mark visual bullish and bearish signals when MACD crossovers align with RSI conditions. User settings allow full customization of MACD lengths, RSI periods, and overbought or oversold thresholds. This indicator provides alert conditions but does not execute trades.

Details

Published by

stella-entry on GitHub

Type

Indicator, Pine Script v5

Draws

Separate pane below the chart

Category

Oscillators & momentum, Moving averages

Markets

Crypto

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
MACD Fast Lengthint12fast_len
MACD Slow Lengthint26slow_len
MACD Signal Lengthint9sig_len
RSI Lengthint14rsi_len
RSI Overboughtint70rsi_ob
RSI Oversoldint30rsi_os
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

The Derivative Oscillator calculates a double-exponentially smoothed Relative Strength Index (RSI) and subtracts its Simple Moving Average (SMA) to form the main oscillator line. A secondary signal line is plotted using an SMA of the main oscillator values. Th

Indicator v4 Oscillators & momentumMoving averages
Updated 10 days ago · GPL-3.0 GitHub repository of Derivative Oscillator

Beep Boop

by magic8bot
409 stars

This indicator calculates a modified MACD oscillator and signal line alongside a trend EMA filter, plotting the output as a stylized column histogram in a separate pane. Instead of plotting true MACD distance, it quantifies positive and negative histogram mome

Indicator v4 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of Beep Boop

MACD

by Alorse
330 stars

This indicator calculates and plots the standard Moving Average Convergence Divergence oscillator in a separate pane. It computes the difference between a fast and slow moving average, derives a signal line through smoothing, and plots a histogram representing

Indicator v4 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of MACD

MACD-V

by harryguiacorn
219 stars

MACD-V is a volatility-normalized momentum indicator based on research by Alex Spiroglou. It calculates the standard MACD histogram and normalizes it by dividing by the Average True Range (ATR). Plotted in a separate pane as a colored histogram, it includes us

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of MACD-V
218 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

KamaFama

by Mastaaa1987
141 stars

KamaFama is an indicator that translates a Freqtrade trading strategy into Pine Script for visualization. It combines Kaufman Adaptive Moving Average (KAMA), MAMA/FAMA calculations derived via Hilbert Transform, Williams %R, and correlation trend filters to ev

Indicator v6 Moving averagesOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of KamaFama

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers