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

 
Andrey Khatimlianskii:

How? Even within the account it can change with different time zones of the local PC and the server.

I'm better at explaining myself in code. Try it. Should work in the Tester, on weekends and in real time.

 

I'll wait until the weekend, and I'll be sure to check it out. About that:

fxsaber:

I thought you needed to solve the problem for practical application, not for "I wish..." talk.

Well, you should understand that it's a simple thing for developers to overwrite a function in the terminal.

 
Vitaly Muzichenko:

You must understand that it is a simple thing for developers to write a function into the terminal.

But now there is a good way to determine GMT cotier not from MT.

 
fxsaber:

I'm better at communicating in code. Give it a try. Should work in Tester, on weekends and in real time.

Only works in greenhouse conditions.

I removed a piece of minute history (and it may not exist for various reasons), and got this result:

TimeServerGMT( 2018.01.06 22:53:19 ) = 2018.01.05 13:53:19
 
Andrey Khatimlianskii:

It works only in greenhouse conditions.

Removed a piece of minute history (and it may not exist for a variety of reasons), and got this result:

I need data for playback. I was relying on the absence of bars when writing this.

 
fxsaber:

I'm better at explaining myself in code. Give it a try. Should work in Tester, on weekends and in real time.

No, it definitely can not be a universal solution

 
Combinator:

No, it definitely can't be a universal solution.

I was talking about forex symbols. I would like to see a counter-example (offline chart, for example).

 
fxsaber:

I need the data for playback. I was banking on the lack of bars when I was writing.

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 knees for a special case.

 
fxsaber:

It was about forex symbols. I would like to see a counter-example (offline chart, for example).

The idea itself is incorrect. There is no guarantee of the beginning of the quotation week on Monday or its end on Friday.

I'm sure that if you run through the history of different brokers, even without making artificial holes, you will find situations where your code does not work.

 
Andrey Khatimlianskii:

The idea itself is incorrect. There is no guarantee of the beginning of the quotation week on Monday or its end on Friday.

This condition is not required there.

I'm sure that if you run through the history of different brokers, even without making artificial holes, you will find situations where your code does not work.

MT4-Server BMFN-ProfessionalDemo.


I was interested, so I ran all the demos I had at hand. No errors. If you know some special (GMT is very different from Moscow time) demo servers, let me know.

Reason: