EA OnTick sometime dont get latest tick created by CustomTicksAdd

 
Hi,
    I use CustomTicksAdd to create ticks from external maket data source via a MT5 service, 
    I checked ticks on the custom symbol chart is perfect compare to external maket data source,

    but I print out custom symbol tick and EA OnTick at the same time, found sometime EA OnTick is very old tick even many new ticks come, 

    for example,  ea onTick always get the old tick 14:23:29 until 14:23:34 in below picture. 

   Please give me some advise,thanks.

 And the below picture is the corresponding tick database. We can see many new ticks come after 14:23:29 but EA OnTick dont get them.


Service code:

mqlTicks[0].time=tickDateTime;
mqlTicks[0].time_msc = (long)(mqlTicks[0].time*1000+msc); 
mqlTicks[0].bid = StringToDouble(tickColumns[20]);               
mqlTicks[0].ask = StringToDouble(tickColumns[30]);   
mqlTicks[0].last = StringToDouble(tickColumns[3]);   
mqlTicks[0].volume=volume; 
mqlTicks[0].volume_real=(double)volume;       
//mqlTicks[0].flags = TICK_FLAG_LAST;
                    
                     
ResetLastError();
                     
int addTickResult=CustomTicksAdd(symbol, mqlTicks); 
    
if(addTickResult<0)
{
  printf("tick add error %d %s %s", GetLastError(), symbol, (string)mqlTicks[0].time);
}
                     
PrintFormat("CustomTicksAdd %s.%03d %s",TimeToString(mqlTicks[0].time,TIME_SECONDS),mqlTicks[0].time_msc%1000, (string)mqlTicks[0].last);

testing EA code:

void OnTick()
  {
      MqlTick last_tick;
      
      if(!SymbolInfoTick(Symbol(),last_tick))
         Print("SymbolInfoTick() failed, error = ",GetLastError());
         
      //--- display the last tick time up to milliseconds
      PrintFormat("ea OnTick %s.%03d %s",TimeToString(last_tick.time,TIME_SECONDS),last_tick.time_msc%1000, (string)last_tick.last);
  }
 
Not all Print() statements are shown in Experts window if they are too much output. Check the log file.
 
Alain Verleyen #:
Not all Print() statements are shown in Experts window if they are too much output. Check the log file.

Hi, thank you for the reply, but it is nothing about log output.  I think it is MQL bug, thanks.

Reason: