Problem with iRSIOnArray

 

Hi!


I have problem with iRSIOnArray() function. I try to build indicator that show me price on witch current bar reach RSI on certain level. So, for that purpose I use iRSIOnArray() function.


But, first at all I can't get same result for the current situation. Both function should give me same result.


Example:


int start() {

   int    counted_bars=IndicatorCounted();
  
   double array[];
   double g[];

   ArrayCopySeries(array,MODE_CLOSE,Symbol(),PERIOD_M15);
   ArraySetAsSeries(array, false);

   ArrayCopy(g,array,0,0,WHOLE_ARRAY);

   Print("iRSIOnArray [g]: " + iRSIOnArray(g,15,14,0) + "   iRSI: " + iRSI(NULL,0,14,PRICE_CLOSE,0));

   return(0);
}


What I'm doing wrong?


Mlaky