Synchronise Windows local time with the MT5 server - page 16

 
Sergey Chalyshev:

That's the thing, the trading server is not synchronised with the quote source.

On forex, trading is around the clock, there are no breaks in trading, the exact time may not be as critical.

On MICEX there are 3 trading intervals and it is necessary to guess if trading is permitted or not, in order not to run into errors. Everyone does it in his own way, because there is no way of knowing whether trading is allowed or not in the terminal.

You have to offer your own variant.
I would like to create a watch in the terminal. It would be in the form of an indicator updated using a timer that would not depend on ticks. The time is determined by TimeLocal() and it would work when there are no quotes but with corrections. Periodically a correction is made, as in this EA to measure delta.
 
Sergey Chalyshev:

That's the thing, the trading server is not synchronised with the quote source.

On forex, trading is around the clock, there are no breaks in trading, the exact time may not be as critical.

On MICEX there are 3 trading intervals and it is necessary to guess if trading is permitted or not, in order not to run into errors. Everyone does it in his own way, because there is no way to find out in the terminal whether trading is allowed or not.

Suggest your variant.

Edit your code a bit

//+------------------------------------------------------------------+
//|                                            Delta Time Server.mq5 |
//+------------------------------------------------------------------+
struct _SYSTEMTIME
  {
   short             year;
   short             mon;
   short             day_of_week;
   short             day;
   short             hour;
   short             min;
   short             sec;
   short             msc;
  };

_SYSTEMTIME loc_time;

#import "kernel32.dll"
void GetLocalTime(_SYSTEMTIME &sys_time);
bool SetLocalTime(_SYSTEMTIME &sys_time);
#import
//---
MqlTick tick;
MqlDateTime sv_time;
int tick_msc,ping,time_server,time_local,delta=0,mdelta[10],n=0;
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   loc_time.year=0;
   GetLocalTime(loc_time);
   if(loc_time.year>0)
     {
      if(!SymbolInfoTick(_Symbol,tick)) { Print("error SymbolInfoTick: ",GetLastError()); return; }
      ping=TerminalInfoInteger(TERMINAL_PING_LAST)/1000;
      tick_msc=int(tick.time_msc%1000);
      TimeToStruct(tick.time,sv_time);

      time_server=(sv_time.sec+sv_time.min*60)*1000+tick_msc;
      time_local=(loc_time.sec+loc_time.min*60)*1000+loc_time.msc;

      delta=AvgDelta(time_server-time_local);
     datetime cur_time = TimeCurrent();
     Print(
           "ping : ",ping,
           " | time current: ", cur_time,
           " | time server: ",sv_time.hour,":",sv_time.min,":",sv_time.sec,",",tick_msc,
           " | time local: ",loc_time.hour,":",loc_time.min,":",loc_time.sec,",",loc_time.msc,
           " | delta ms: ",delta,
           " | min max delta: ",mdelta[ArrayMaximum(mdelta)]," : ",mdelta[ArrayMinimum(mdelta)],
           "");
     }
  }
//+------------------------------------------------------------------+
int AvgDelta(int d)
  {
   int avgd=0;
   mdelta[n]=d;
   n++; if(n>=10) n=0;
   for(int i=0;i<10;i++) avgd+=mdelta[i];
   return(avgd/10);
  }
//+------------------------------------------------------------------+

Sync by

2017.02.01 10:00:00.008 Net_switcher (URKA-3.17,H1)     Local time sync is done. Symbol = Si-3.17 Sync hour = 10 Sync min = 0 Sync sec = 0 Sync ms = 8

Results of your Expert Advisor

2017.02.01 10:05:50.294 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:50 | time server: 10:5:50,293 | time local: 10:5:50,294 | delta ms: 0 | min max delta: 0 : -1
2017.02.01 10:05:50.515 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:50 | time server: 10:5:50,531 | time local: 10:5:50,515 | delta ms: 1 | min max delta: 16 : -1
2017.02.01 10:05:50.781 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:50 | time server: 10:5:50,800 | time local: 10:5:50,781 | delta ms: 3 | min max delta: 19 : -1
2017.02.01 10:05:51.786 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:51 | time server: 10:5:51,797 | time local: 10:5:51,786 | delta ms: 4 | min max delta: 19 : -1
2017.02.01 10:05:51.799 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:51 | time server: 10:5:51,811 | time local: 10:5:51,799 | delta ms: 5 | min max delta: 19 : -1
2017.02.01 10:05:51.852 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:51 | time server: 10:5:51,872 | time local: 10:5:51,852 | delta ms: 7 | min max delta: 20 : -1
2017.02.01 10:05:51.946 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:51 | time server: 10:5:51,961 | time local: 10:5:51,946 | delta ms: 9 | min max delta: 20 : -1
2017.02.01 10:05:52.243 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:52 | time server: 10:5:52,265 | time local: 10:5:52,243 | delta ms: 11 | min max delta: 22 : -1
2017.02.01 10:05:52.564 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:52 | time server: 10:5:52,577 | time local: 10:5:52,564 | delta ms: 12 | min max delta: 22 : -1
2017.02.01 10:05:52.914 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:52 | time server: 10:5:52,932 | time local: 10:5:52,914 | delta ms: 14 | min max delta: 22 : -1
2017.02.01 10:05:52.928 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:52 | time server: 10:5:52,938 | time local: 10:5:52,928 | delta ms: 15 | min max delta: 22 : 10
2017.02.01 10:05:53.167 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:53 | time server: 10:5:53,184 | time local: 10:5:53,167 | delta ms: 15 | min max delta: 22 : 10
2017.02.01 10:05:53.793 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:53 | time server: 10:5:53,810 | time local: 10:5:53,793 | delta ms: 15 | min max delta: 22 : 10
2017.02.01 10:05:53.897 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:53 | time server: 10:5:53,906 | time local: 10:5:53,897 | delta ms: 15 | min max delta: 22 : 9
2017.02.01 10:05:54.377 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:54 | time server: 10:5:54,366 | time local: 10:5:54,377 | delta ms: 13 | min max delta: 22 : -11
2017.02.01 10:05:54.467 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:54 | time server: 10:5:54,481 | time local: 10:5:54,467 | delta ms: 12 | min max delta: 22 : -11
2017.02.01 10:05:54.586 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:54 | time server: 10:5:54,594 | time local: 10:5:54,586 | delta ms: 11 | min max delta: 22 : -11
2017.02.01 10:05:54.933 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:54 | time server: 10:5:54,953 | time local: 10:5:54,933 | delta ms: 11 | min max delta: 20 : -11
2017.02.01 10:05:55.772 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:55 | time server: 10:5:55,794 | time local: 10:5:55,772 | delta ms: 12 | min max delta: 22 : -11
2017.02.01 10:05:55.961 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:55 | time server: 10:5:55,980 | time local: 10:5:55,961 | delta ms: 12 | min max delta: 22 : -11
2017.02.01 10:05:55.981 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:55 | time server: 10:5:55,996 | time local: 10:5:55,981 | delta ms: 13 | min max delta: 22 : -11
2017.02.01 10:05:56.306 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:56 | time server: 10:5:56,318 | time local: 10:5:56,306 | delta ms: 12 | min max delta: 22 : -11
2017.02.01 10:05:56.684 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:56 | time server: 10:5:56,694 | time local: 10:5:56,684 | delta ms: 11 | min max delta: 22 : -11
2017.02.01 10:05:56.726 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:56 | time server: 10:5:56,738 | time local: 10:5:56,726 | delta ms: 12 | min max delta: 22 : -11
2017.02.01 10:05:57.082 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,104 | time local: 10:5:57,82 | delta ms: 15 | min max delta: 22 : 8
2017.02.01 10:05:57.096 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,109 | time local: 10:5:57,96 | delta ms: 15 | min max delta: 22 : 8
2017.02.01 10:05:57.236 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,252 | time local: 10:5:57,236 | delta ms: 16 | min max delta: 22 : 10
2017.02.01 10:05:57.294 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,305 | time local: 10:5:57,294 | delta ms: 15 | min max delta: 22 : 10
2017.02.01 10:05:57.416 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,432 | time local: 10:5:57,416 | delta ms: 14 | min max delta: 22 : 10
2017.02.01 10:05:57.422 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,438 | time local: 10:5:57,422 | delta ms: 14 | min max delta: 22 : 10
2017.02.01 10:05:57.435 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,449 | time local: 10:5:57,435 | delta ms: 14 | min max delta: 22 : 10
2017.02.01 10:05:57.477 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:57 | time server: 10:5:57,490 | time local: 10:5:57,477 | delta ms: 14 | min max delta: 22 : 10
2017.02.01 10:05:58.065 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:58 | time server: 10:5:58,81 | time local: 10:5:58,65 | delta ms: 14 | min max delta: 22 : 11
2017.02.01 10:05:58.071 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:58 | time server: 10:5:58,85 | time local: 10:5:58,71 | delta ms: 15 | min max delta: 22 : 11
2017.02.01 10:05:58.571 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:58 | time server: 10:5:58,593 | time local: 10:5:58,571 | delta ms: 15 | min max delta: 22 : 11
2017.02.01 10:05:58.636 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:58 | time server: 10:5:58,655 | time local: 10:5:58,636 | delta ms: 15 | min max delta: 22 : 11
2017.02.01 10:05:58.645 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:58 | time server: 10:5:58,661 | time local: 10:5:58,645 | delta ms: 15 | min max delta: 22 : 11
2017.02.01 10:05:58.645 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:05:58 | time server: 10:5:58,661 | time local: 10:5:58,645 | delta ms: 16 | min max delta: 22 : 13
 

And a little more

2017.02.01 10:15:37.781 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,787 | time local: 10:15:37,781 | delta ms: 0 | min max delta: 6 : 0
2017.02.01 10:15:37.891 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,896 | time local: 10:15:37,891 | delta ms: 1 | min max delta: 6 : 0
2017.02.01 10:15:37.898 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,910 | time local: 10:15:37,898 | delta ms: 2 | min max delta: 12 : 0
2017.02.01 10:15:37.986 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,994 | time local: 10:15:37,986 | delta ms: 3 | min max delta: 12 : 0
2017.02.01 10:15:38.829 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:38 | time server: 10:15:38,825 | time local: 10:15:38,829 | delta ms: 2 | min max delta: 12 : -4
2017.02.01 10:15:39.306 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,320 | time local: 10:15:39,306 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.410 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,415 | time local: 10:15:39,410 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.417 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,415 | time local: 10:15:39,417 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.547 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,549 | time local: 10:15:39,547 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.579 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,586 | time local: 10:15:39,579 | delta ms: 5 | min max delta: 14 : -4
2017.02.01 10:15:39.585 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,591 | time local: 10:15:39,585 | delta ms: 5 | min max delta: 14 : -4
2017.02.01 10:15:40.086 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:40 | time server: 10:15:40,92 | time local: 10:15:40,86 | delta ms: 5 | min max delta: 14 : -4
2017.02.01 10:15:40.099 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:40 | time server: 10:15:40,95 | time local: 10:15:40,99 | delta ms: 3 | min max delta: 14 : -4
 
Dmitry Fedoseev:
Would make a clock in the terminal. In the form of indicator, updated by timer so as not to depend on ticks, the time is determined by TimeLocal(), so that it would work when there are no quotes, but with a correction. Periodically a correction is made, as in this EA to measure delta.
It is not quite clear how to take time accurate to milliseconds from the indicator. Does the indicator have to overwrite the buffer every millisecond?
 
prostotrader:

And a little more

2017.02.01 10:15:37.781 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,787 | time local: 10:15:37,781 | delta ms: 0 | min max delta: 6 : 0
2017.02.01 10:15:37.891 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,896 | time local: 10:15:37,891 | delta ms: 1 | min max delta: 6 : 0
2017.02.01 10:15:37.898 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,910 | time local: 10:15:37,898 | delta ms: 2 | min max delta: 12 : 0
2017.02.01 10:15:37.986 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:37 | time server: 10:15:37,994 | time local: 10:15:37,986 | delta ms: 3 | min max delta: 12 : 0
2017.02.01 10:15:38.829 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:38 | time server: 10:15:38,825 | time local: 10:15:38,829 | delta ms: 2 | min max delta: 12 : -4
2017.02.01 10:15:39.306 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,320 | time local: 10:15:39,306 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.410 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,415 | time local: 10:15:39,410 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.417 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,415 | time local: 10:15:39,417 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.547 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,549 | time local: 10:15:39,547 | delta ms: 4 | min max delta: 14 : -4
2017.02.01 10:15:39.579 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,586 | time local: 10:15:39,579 | delta ms: 5 | min max delta: 14 : -4
2017.02.01 10:15:39.585 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:39 | time server: 10:15:39,591 | time local: 10:15:39,585 | delta ms: 5 | min max delta: 14 : -4
2017.02.01 10:15:40.086 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:40 | time server: 10:15:40,92 | time local: 10:15:40,86 | delta ms: 5 | min max delta: 14 : -4
2017.02.01 10:15:40.099 DeltaTimeServer (Si-3.17,H1)    ping : 15 | time current: 2017.02.01 10:15:40 | time server: 10:15:40,95 | time local: 10:15:40,99 | delta ms: 3 | min max delta: 14 : -4


It's fine, it's just not clear why we need to synchronise the time after the trading session has started, we need to synchronise it before.
 
Sergey Chalyshev:
It's ok, but it's not clear why I need to synchronize time after trade session, I need it before.

I tried it, but only info (orders) can be taken before the start of sessions, but

using CopyTicks with INFO flag I get the same shit as I did withSymbolInfoTick

(I'll leave it like this, and then we'll see)

Added

And then 10-15 ms do not play royalty :)

On the market, anyway, you cannot buy at 10:00:00.000 (they will queue for a long time :( )
 

After synchronisation at 14-05.

"Gone" in 3.5 hours, but not by much.

2017.02.01 17:31:53.732 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:53 | time server: 17:31:53,528 | time local: 17:31:53,732 | delta ms: -20 | min max delta: 0 : -204
2017.02.01 17:31:53.910 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:53 | time server: 17:31:53,710 | time local: 17:31:53,910 | delta ms: -40 | min max delta: 0 : -204
2017.02.01 17:31:53.922 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:53 | time server: 17:31:53,715 | time local: 17:31:53,922 | delta ms: -61 | min max delta: 0 : -207
2017.02.01 17:31:54.170 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:53 | time server: 17:31:53,960 | time local: 17:31:54,170 | delta ms: -82 | min max delta: 0 : -210
2017.02.01 17:31:54.177 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:53 | time server: 17:31:53,975 | time local: 17:31:54,177 | delta ms: -102 | min max delta: 0 : -210
2017.02.01 17:31:54.190 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:53 | time server: 17:31:53,980 | time local: 17:31:54,190 | delta ms: -123 | min max delta: 0 : -210
2017.02.01 17:31:54.288 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:54 | time server: 17:31:54,69 | time local: 17:31:54,288 | delta ms: -145 | min max delta: 0 : -219
2017.02.01 17:31:54.489 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:54 | time server: 17:31:54,289 | time local: 17:31:54,489 | delta ms: -165 | min max delta: 0 : -219
2017.02.01 17:31:54.497 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:54 | time server: 17:31:54,294 | time local: 17:31:54,497 | delta ms: -185 | min max delta: 0 : -219
2017.02.01 17:31:54.759 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:54 | time server: 17:31:54,557 | time local: 17:31:54,759 | delta ms: -205 | min max delta: -200 : -219
2017.02.01 17:31:55.182 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:54 | time server: 17:31:54,988 | time local: 17:31:55,182 | delta ms: -204 | min max delta: -194 : -219
2017.02.01 17:31:55.192 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:55 | time server: 17:31:54,993 | time local: 17:31:55,192 | delta ms: -204 | min max delta: -194 : -219
2017.02.01 17:31:55.976 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:55 | time server: 17:31:55,778 | time local: 17:31:55,976 | delta ms: -203 | min max delta: -194 : -219
2017.02.01 17:31:55.986 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:55 | time server: 17:31:55,783 | time local: 17:31:55,986 | delta ms: -203 | min max delta: -194 : -219
2017.02.01 17:31:55.986 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:55 | time server: 17:31:55,783 | time local: 17:31:55,986 | delta ms: -203 | min max delta: -194 : -219
2017.02.01 17:31:56.321 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:56 | time server: 17:31:56,106 | time local: 17:31:56,321 | delta ms: -203 | min max delta: -194 : -219
2017.02.01 17:31:56.481 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:56 | time server: 17:31:56,274 | time local: 17:31:56,481 | delta ms: -202 | min max delta: -194 : -215
2017.02.01 17:31:56.849 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:56 | time server: 17:31:56,647 | time local: 17:31:56,849 | delta ms: -202 | min max delta: -194 : -215
2017.02.01 17:31:56.871 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:56 | time server: 17:31:56,663 | time local: 17:31:56,871 | delta ms: -203 | min max delta: -194 : -215
2017.02.01 17:31:57.119 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 17:31:56 | time server: 17:31:56,912 | time local: 17:31:57,119 | delta ms: -203 | min max delta: -194 : -215

Added

I'll have another look before closing at 11pm

Added

If I don't fall asleep.

 

Didn't have time to synchronise at 7:00 p.m.

Here's what's come up since 2 o'clock

2017.02.01 19:57:39.060 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:38 | time server: 19:57:38,726 | time local: 19:57:39,60 | delta ms: -33 | min max delta: 0 : -334
2017.02.01 19:57:39.210 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:38 | time server: 19:57:38,873 | time local: 19:57:39,210 | delta ms: -67 | min max delta: 0 : -337
2017.02.01 19:57:39.451 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:39 | time server: 19:57:39,111 | time local: 19:57:39,451 | delta ms: -101 | min max delta: 0 : -340
2017.02.01 19:57:40.509 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:40 | time server: 19:57:40,169 | time local: 19:57:40,509 | delta ms: -135 | min max delta: 0 : -340
2017.02.01 19:57:42.518 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:42 | time server: 19:57:42,184 | time local: 19:57:42,518 | delta ms: -168 | min max delta: 0 : -340
2017.02.01 19:57:42.533 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:42 | time server: 19:57:42,194 | time local: 19:57:42,532 | delta ms: -202 | min max delta: 0 : -340
2017.02.01 19:57:42.538 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 19:57:42 | time server: 19:57:42,196 | time local: 19:57:42,538 | delta ms: -236 | min max delta: 0 : -342
 

I'm off to bed now, it's from 2:05 p.m.

2017.02.01 22:43:19.018 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:18 | time server: 22:43:18,531 | time local: 22:43:19,18 | delta ms: -48 | min max delta: 0 : -487
2017.02.01 22:43:21.273 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:20 | time server: 22:43:20,793 | time local: 22:43:21,273 | delta ms: -96 | min max delta: 0 : -487
2017.02.01 22:43:23.192 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:22 | time server: 22:43:22,712 | time local: 22:43:23,192 | delta ms: -144 | min max delta: 0 : -487
2017.02.01 22:43:23.533 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:23 | time server: 22:43:23,50 | time local: 22:43:23,533 | delta ms: -193 | min max delta: 0 : -487
2017.02.01 22:43:23.864 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:23 | time server: 22:43:23,382 | time local: 22:43:23,864 | delta ms: -241 | min max delta: 0 : -487
2017.02.01 22:43:23.925 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:23 | time server: 22:43:23,438 | time local: 22:43:23,925 | delta ms: -289 | min max delta: 0 : -487
2017.02.01 22:43:24.022 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:23 | time server: 22:43:23,542 | time local: 22:43:24,22 | delta ms: -337 | min max delta: 0 : -487
2017.02.01 22:43:24.592 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:24 | time server: 22:43:24,105 | time local: 22:43:24,592 | delta ms: -386 | min max delta: 0 : -487
2017.02.01 22:43:24.634 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:24 | time server: 22:43:24,143 | time local: 22:43:24,634 | delta ms: -435 | min max delta: 0 : -491
2017.02.01 22:43:24.922 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:24 | time server: 22:43:24,439 | time local: 22:43:24,922 | delta ms: -484 | min max delta: -480 : -491
2017.02.01 22:43:25.247 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:24 | time server: 22:43:24,754 | time local: 22:43:25,247 | delta ms: -484 | min max delta: -480 : -493
2017.02.01 22:43:25.354 DeltaTimeServer (Si-3.17,H1)    ping : 13 | time current: 2017.02.01 22:43:24 | time server: 22:43:24,859 | time local: 22:43:25,354 | delta ms: -486 | min max delta: -480 : -495
 

Here is a clear example of a local time mismatch:

2017.02.03 10:00:03.798 trader (Eu-3.17,M1)     StopTrading: Время сервера = 09:59:47; Статус ордера = SELL_ORDER; Билет = 0 OnTradeTransaction: Sell ордер не установлен! Причина:  Рынок закрыт
2017.02.03 10:00:03.798 trader (Eu-3.17,M1)     StopTrading: Удаление существующих ордеров по инструменту....
2017.02.03 10:00:03.798 trader (Eu-3.17,M1)     Эксперт остановлен. Инструмент Eu-3.17
2017.02.03 10:00:00.947 switcher (URKA-3.17,H1) Local time sync is done. Symbol = URKA-3.17 Sync hour = 10 Sync min = 0 Sync sec = 0 Sync ms = 947
Reason: