ArrayCopySeries problem in BackTester

 
Hello,

I was write a multitimeframe indicator by this way....
ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),iTimeFrame); 
for(i=0,m=0;i<iLimit;i++){      
      if (Time[i]<TimeArray[m]) m++;
      dBuffer[i] = iCustom(NULL, iTimeFrame, "#Core_Indicator", iPrice1, iLength1, iFilter1, dDeviation1, 0, m);      
}

Everything works fine, but if I make EA with icustom this indicator (on another timeframe than backtester running) ArrayCopySeries was copied each bar from history for chosen timeframe in this indicator.
And there is problem because I must have in TimeArray varible lasttime of bar from backtester modelling no from history then isn't this condition satisfied.

      if (Time[i]<TimeArray[m]) m++;

I tried fill a TimeArray varible by my own cycle but is it very slowly, can somebody help me?

Kurtas
Reason: