Need a help to solve CCI and RSI crossing code

 

Hello friends, I need some help to solve this issue. The fact is, there is a EMA period of 9, CCI period of 14 and RSI period of 14.For go for a long, when the present candle cross the EMA and CCI ( CCI direction from the bottom to top in between CCI levels of -45 and +55. ) cross the RSI.   For go for a short, when the present candle cross the EMA and CCI ( CCI direction from the  top to bottom  in between CCI levels of -45 and +55. ) cross the RSI.   I have done the code as follows. Bt the issue is some  unwanted arrows are appeared on the chart. Can some one help me to solve this issue. Thank You.  


image

 
apremarathna225: I need some help to solve this issue
I already have you the answer to how to check for a cross. This is no different.

Don't triple post

 

Why would you check for a cross of 2 indicators with different scales?

CCI has positive and negative values whereas RSI is all positive. A cross is not possible while the CCI is negative.

Any cross that you may see in the indicator window is meaningless as the values are on different scales. Move the chart on the x axis and a cross that may have been there is no longer a cross.