News EA- I am getting precision error -Any help appreciated

 

All- one of my news EA, I am getting below error -

broker base time updated to a more precise time 


Below is the code and Any idea on how to fix this error?



  //------------------------------------------------------------------

  if (!IsConnected() || AccountNumber() == 0 || Bars <= 30 || ArraySize(Time) == 0) return;

  //------------------------------------------------------------------

  if (baseTime.time == 0)

  {

    baseTime.time = TimeCurrent();

    baseTime.ticks = GetTickCount();

  }

  else

  {

    if (TimeCurrent()-baseTime.time >= 10)

    {

      ulong newTicks = GetTickCount();

      if (ulong((TimeCurrent()-baseTime.time)*1000) < newTicks-baseTime.ticks)

      {

        baseTime.time = TimeCurrent(); baseTime.ticks = newTicks;

        if (Logging) Print("broker base time updated to a more precise time ("+TimeToStr(baseTime.time, TIME_DATE|TIME_SECONDS)+", "+IntegerToString(baseTime.ticks)+")");

        

        for (int i = 0; i < 4; i++)

          if (events[i].time > baseTime.time + 10)

            events[i].ticks = newTicks+(events[i].time-baseTime.time)*1000+ReadingInterval;

      }

    }

  }

 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

Thank you.

Reason: