How to use Predefined Indicator for MultiPair EA?

 
fRSI(SelectedSymbol, PERIOD_CURRENT, 14, PRICE_CLOSE, 0);

double fRSI(string sy,ENUM_TIMEFRAMES SelectedTimeFrame,int period,ENUM_APPLIED_PRICE applied_price,int shift)
  {
   double buf[1];
   int handle=iRSI(sy,SelectedTimeFrame,period,applied_price);
   if(handle<0)
     {
      OpenNewTrade = false;
      return(0);
     }
   else
     {
      if(CopyBuffer(handle,0,shift,1,buf)<0)
        {
         OpenNewTrade = false;
         IndicatorRelease(handle);
         return(0);
        }
     }
   IndicatorRelease(handle);
   return(buf[0]);
  }

List of Indicator : https://www.mql5.com/en/docs/indicators/irsi


For example, i made function for RSI. is this right way to use for multi-currency pair EA?