MT5 - Multi-Currency Indicator in Tester - page 2

To add comments, please log in or register
albry
68
albry  
FYI, resolved these data gap issues by creating/maintaining a local "corrected" version of the price information for each symbol using iBarShift to fill in data gaps with the symbols closest bar.

Basic idea is as follows... 

void FixAnyGaps(string sym, double& symArr[], int limit) {
   for (int i=limit; i>=0; i--) {
      datetime bTime     = iTime(NULL, 0, i);
      int symsClosestBar = iBarShift(sym, 0, bTime);
      symArr[i]          = iClose(sym, 0, symsClosestBar);
   }
}


12
To add comments, please log in or register