RSI Value Stuck at certain price

 

Hi Team,

I am creating simple RSI strategy. But My iRSI function is stuck at certain price. when it cross 70 value it stop to calculating value Please look into below  code and screen shot.

Here is code

double RSI=NormalizeDouble(iRSI(_Symbol,_Period,14,PRICE_CLOSE,0),4);

if( RSI<30 ){

----Buy

}

if( RSI>70){

---Sell

}

i have attached both working and value stuck at certain point code


Thanks in advance

Files:
 
swapnil godbole:

Hi Team,

I am creating simple RSI strategy. But My iRSI function is stuck at certain price. when it cross 70 value it stop to calculating value Please look into below  code and screen shot.

Here is code

i have attached both working and value stuck at certain point code


Thanks in advance

If your program does not do what you expecxt it to do use the debugger: https://www.mql5.com/en/articles/654
Debugging MQL5 Programs
Debugging MQL5 Programs
  • www.mql5.com
This article is intended primarily for the programmers who have already learned the language but have not fully mastered the program development yet. It reveals some debugging techniques and presents a combined experience of the author and many other programmers.
 
Thank you Carl I will check
 

Hi Carl,

Thanks for help but we cant debug code while testing and i am facing issue while testing. We can print and alter output while testing.

Thanks

Reason: