Features of the mql5 language, subtleties and tricks - page 78

 
Andrey Khatimlianskii:

I deleted an arbitrary section, several days long, and ran a loop, starting from the current time, in the history, until I ran into an incorrect shift.

Sorry for the lack of code, I built it on my own for a special case.

I'm afraid it won't work without a concrete example.

 
fxsaber:

I got curious, so I ran all the demos I had on hand. No errors.

Did you watch the current time or run through the history?

 
fxsaber:

I'm afraid that without a concrete example of the constructive will not work.

Unfortunately, I am not ready to provide a reproducible example right now.

 
Andrey Khatimlianskii:

Have you looked at the current time or run through history?

Current. I did not do a thorough history check.

 
fxsaber:

Current. I have not done a thorough check of the history.

You do not need a thorough, simple removal of part of the history and the cycle in depth will quickly give an answer.

I will try to prepare an example to reproduce, but later.

 
Andrey Khatimlianskii:

A thorough one is not necessary, a simple removal of part of the history and a cycle in depth will quickly give an answer.

The method is based on the analysis of the last and the first bar of the trading week. Therefore, deleting pieces should not affect the result.

I will try to prepare an example to be reproduced but later.

It will be interesting to see.

 
fxsaber:
For forex you can remake this code from f4

This code is not working as expected.

2018.03.30 18:31:01.788 170953 NZDCHF,Daily: TimeServerGMT() = 2018.03.30 16:30:56
2018.03.30 18:31:01.788 170953 NZDCHF,Daily: TimeGMT() = 2018.03.30 16:31:01


 
Alain Verleyen:

This code is not working as expected.

2018.03.30 18:31:01.788 170953 NZDCHF,Daily: TimeServerGMT() = 2018.03.30 16:30:56
2018.03.30 18:31:01.788 170953 NZDCHF,Daily: TimeGMT() = 2018.03.30 16:31:01

You have shown that the code worked perfectly! TimeServerGMT is the same as TimeGMT.

 
Alain Verleyen:

This code is not working as expected.

2018.03.30 18:31:01.788 170953 NZDCHF,Daily: TimeServerGMT() = 2018.03.30 16:30:56
2018.03.30 18:31:01.788 170953 NZDCHF,Daily: TimeGMT() = 2018.03.30 16:31:01


The function of TimeServerGMT() is to find GMT time corresponds to Market Watch time.

 
fxsaber:

You have shown that the code worked perfectly! TimeServerGMT is the same as TimeGMT.

I would like to get the server time according to GMT.