Hi DD, Thanks it worked. Will need some explanation on how to use. Are you writing these studies on your own using Thinkscript? I am thinking of writing RSI divergence alert using thinkscript, but do not know how to start.