CDC RSI Divergence 15-10-2016

An updated version of CDC RSI Divergence
The last version have fixed reversal amount to weed out false signal.
The reversal amount, however, needs to be calibrated to different chart.
The new one uses ATR instead, user can customize the ATR multiplier.


though it can be used in such a way it is not designed to.
The system helps identify Bullish and Bearish Divergence to help trader change their bias accordingly and should be used in conjunction with a trend following signal.

BULLISH DIVERGENCE is displayed with a green fill over 50 line.
BEARISH DIVERGENCE is displayed with a red fill under 50 line.
The indicator start on the bar where divergence is detected and persists for another 25 bars for easy regcognition.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


hi this seems great how do i create an alert in trading view as soon as there is divergence detected in the indicator. please help
+15 Reply
What does the blue / yellow indicate?
+2 Reply
i create new indicator file in editor and it didnt work. i checked it and there two error lines 66 error is ")" and 2 error is "study".
+1 Reply
piriya33 sulbas
Have you tried just duplicating the code and edit them?
+1 Reply
hi can you say what the yellow and blue blocks represent?i notice the source code is osl,oslv can you explain please.
thank you for ur works. ur indicator seems useful how can i use this? shall i create a new indicator mql4 file in edtor? thank u for support
piriya33 sulbas
I personally use this to assist my MACD system.
I would take the prebuy and presell (macd cross signal line) only if a divergence is present , otherwise, stick to 2ma (macd cross zero)
+3 Reply
BhushanJ2 piriya33
Great work