Not all candles start at the same time

 
I want an EA to run so that at the creation of a new bar the EA iterates through 28 pairs and checks the value of a custom indicator for bars [1] & [2] (i.e. not the current bar that has just been created but the previous two bars).

Unfortunately as I iterate through the pairs it seems that some pairs have generated a new candle and some have not. 

 

   for(int i=0;i<_trading_count;i++)
     {
      string symbol=_trading_pairs[i];

      datetime dt=iTime(symbol,Period(),0);

      PrintFormat("%s %s",symbol,TimeToString(dt, TIME_DATE|TIME_SECONDS));

 

How can I ensure that all pairs have started the new bar?

Thanks in advance
Paul 

 
rcsltd:...

How can I ensure that all pairs have started the new bar?

Thanks in advance
Paul 

By checking the time of the candle, but you can have great differences. It depends of the market, you can sometimes have to wait minutes before the new candle is started in all pairs. On lower timeframes you can also have missing bars.
Reason: