OPEN-SOURCE SCRIPT
MG - Real time RSI divergence

Shows RSI divergences in real time (as soon as bar closes in divergence instead of waiting for an RSI pivot).
There are alerts included on these events so you are immediately made aware of divergence.
Adjustement:
There are alerts included on these events so you are immediately made aware of divergence.
Adjustement:
- It works by detecting a break of a previous high or low and then comparing the RSI value at the last break to the current break. Therefore, by decreasing the adjacent candles required for a pivot, you increase the number of divergence checks and therefore divergence readings. As with many indicators, with higher the values, you get less but more significant signals. (This can be visualized with the plot pivot lines option)
- RSI period can be adjusted
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.