RSI Value Stuck at certain price

swapnil godbole
14

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:
Carl Schreiber
Moderator
12275
Carl Schreiber  
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.
swapnil godbole
14
swapnil godbole  
Thank you Carl I will check