I am trying to find the diffrence between EUR and USD calculated in a form of EURUSD=EURCHF / USDCHF. The product should be in pips.
However when code it like this i come across a problem - if in one of the pairs is a value missing in the data, the script skips it and starts to use different times data in this formula. And ofcourse it leads to a total nonsence. What to do?

Code:
   for(int i=0;i<500;i++)
      {
      ExtMapBuffer1[i]=(iClose("EURUSD",PERIOD_M1,i)-iClose("EURCHF",PERIOD_M1,i)/iClose("USDCHF",PERIOD_M1,i))*10000;
      }