OPEN-SOURCE SCRIPT

MACD crossover while RSI Oversold/Overbought

Updated
This indicator draws signals on the chart when a Bullish MACD Crossover occurs at the same time RSI is "oversold", and also when Bearish MACD Crossover occurs at the same time RSI is "overbought"


Indicators are drawn on the chart in the following scenarios:

1. Bullish signal
a. MACD bullish crossover occurs on a single bar
b. RSI was below the Oversold threshold (29 by default) within the prior 5 bars

2. Bearish signal
a. MACD bearish crossover occurs on a singnle bar
b. RSI was above the Overbought threshold (71 by default) within the prior 5 bars
Release Notes
Removed other distractions off sample chart to give a better idea of the overlay indicators
Moving Average Convergence / Divergence (MACD)macdcrossmacdcrossingmacdcrossoverRelative Strength Index (RSI)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer