Incorrect return values

 

   Whenever I test the rsi values using this code, the value returned is always 0. I don't understand why. I appreciate your help in advance

   double RSI15 = iRSI(NULL, PERIOD_M15, 0, PRICE_CLOSE, 0);
   double RSI60 = iRSI(NULL, PERIOD_H1, 0, PRICE_CLOSE, 0);
   double RSI240 = iRSI(NULL, PERIOD_H4, 0, PRICE_CLOSE, 0);
 
luxecapital:

   Whenever I test the rsi values using this code, the value returned is always 0. I don't understand why. I appreciate your help in advance

thats clearly not the code that you are getting a return value, so how do you expect any one to help you without seeing the whole code you say that returns 0?

 
Revo Trades #:

thats clearly not the code that you are getting a return value, so how do you expect any one to help you without seeing the whole code you say that returns 0?

If I were to test it in the script it returns 0.

I simply do Alert(RSI15); on the same timeframe on any graph 

 
luxecapital #: If I were to test it in the script it returns 0.
   double RSI15 = iRSI(NULL, PERIOD_M15, 0, PRICE_CLOSE, 0);
  1. Why did you post your MT4 question in the MT5 EA section instead of the MQL4 section, (bottom of the Root page)?
              General rules and best pratices of the Forum. - General - MQL5 programming forum?
    Next time, post in the correct place. The moderators will likely move this thread there soon.

  2. Of course, it returns zero. What do you expect with a length of zero?