Features of the mql5 language, subtleties and tricks - page 76
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Robo
My local was 17:17:13
And who is to blame for this, the terminal or the DC with crooked settings?
The terminal. This is reproduced on the MQ-Demo.
It turns out that TimeTradeServer returns not what it says in the documentation, but just the local time?
It's because everything is connected to the local time.
But what does the word Server have to do with it?
Server, is the server, not the user's computer!
Anyway, not enough server time, without any binding to the computer, and lunar cycles. By TimeCurrent() alone, there is no way to know how much time has elapsed, from the last tick by server time, not computer time.
It turns out that TimeTradeServer returns not what is stated in the documentation, but just the local time?
Yes.
By TimeCurrent() alone, on weekends there is no way to know how much time has passed from the last tick to the time of the server, not the computer.
Use the MT4 variant, it also works on weekends.
Use the MT4 option, it works on weekends too.
Thank you!
But still, in the new build you can add just one function, and not use self-written crutches in the code for the simplest calculation.
Yes, the point is that everything is tied to the local time of the computer, the documentation says so
But what does the word Server have to do with it?
The server is the server, not the user's computer!
Anyway, not enough server time, without any binding to the computer, and lunar cycles. By TimeCurrent() alone, on weekends there is no way to find out how much time has passed since the last tick in the server time, not the computer.
Probably need to write an application to the CD. Or invite Renat here.
Thank you!
But still in the new build you can add just one function, and not use for the simplest calculation self-written crutches in the code.
I thought you needed to solve the problem for practical use, not for "I wish..." talk.
GMTOffset on forex symbols can be determined by the closing/opening time of the trading week. After all, the local time of this event is known.
How? It can change even within the account at different time zones of the local PC and the server.
Thought you needed the problem solved for practical application, not for "I wish..." talk.
I need.
Only without assumptions that it is a full working week (without holidays, server pauses), that Monday's quote came in the first minute, or that the nonfarm went out on schedule (I saw this option, too). And without counting on the fact that the call will take place during working hours of the server.