IRSI returns the wrong value

 

Hey guys,

i hope you can help me.

the code is 

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   
   double cci_curr=iCCI(NULL,0,14,PRICE_CLOSE ,0);
   double cci_prev=iCCI(NULL,0,14,PRICE_CLOSE,1);
   double cci_prev2=iCCI(NULL,0,14,PRICE_CLOSE,2);
   
   
   Alert(cci_curr + " " + cci_prev + " " + cci_prev2);
   
   
   
  }

it returns the wrong RSI values 


Thanks in advance guys,

Happy Coding. ;)

 
Hossamudee:

Hey guys,

i hope you can help me.

the code is 

it returns the wrong RSI values 


Thanks in advance guys,

Happy Coding. ;)

Use same price and then you shall have same values

PS: that is CCI - not RSI

 
Mladen Rakic:

Use same price and then you shall have same values

PS: that is CCI - not RSI


thanks for your reply :) yeah it's CCI, my mistake.

please let me know what you mean by using the same price?

are you referring to the PRICE_CLOSE part?


Thanks again.

 
Hossamudee:

thanks for your reply :) yeah it's CCI, my mistake.

please let me know what you mean by using the same price?

are you referring to the PRICE_CLOSE part?


Thanks again.

Yes

And when you set that same price in the cci that you attached to to chart, the values are going to be exactly the same

 
Mladen Rakic:

Yes

And when you set that same price in the cci that you attached to to chart, the values are going to be exactly the same


Thanks brother, it worked!!