
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
In some cases, the response has to come from the DC server! And the DCs don't really care about that. That's why it's not working so well.
Oh, good. That solved the problem.
:))))))))
Oh, good. That solved the problem.
:))))))))
And today
IsTradeAllowed(Symbol(), TimeCurrent())
shows cow.
The function seems to focus only on the trading schedule. And it cannot consider such exceptions as holidays because it requires additional schedule from the broker who does not consider it necessary.
As a result, we come to the conclusion that there is no simple way to determine a closed market. That leaves the method that has already been tested many times in practice.
By the way, why do you have Local Time?
...
Because the server time (TimeCurrent()) does not change on weekends.Really, no change, last known server time or tick, no tick no time change.
Fuck, is it hard for you to go to the terminal and look at it now???
Why would you do that? You can see for yourself that it does not change. Besides, there is a clear wording in the documentation:https://docs.mql4.com/ru/dateandtime/timecurrent.
Returns last known server time
That is, this is the time of the last incoming tick for any of the symbols from Market Watch. This time can change on weekends, if the broker provides quotes even on weekends and holidays. But the vast majority of brokers have no such thing - you will always get the time of the last tick on Friday at the weekend.
Why would you do that? You can see for yourself that it does not change. Besides, there is a clear wording in the documentation:https://docs.mql4.com/ru/dateandtime/timecurrent.
That is, it is the time of the last incoming tick for any of the symbols in the Market Watch. On weekends, this time may change if the broker provides quote data even on weekends and public holidays.
Because if you enter the terminal, time is updated there by date when you entered the terminal and it does not matter whether there are ticks or not.
You dismiss the obvious without stating your facts. Where have you seen this? Perhaps in the terminals of brokers which give quotes at the weekend? Then that's right - there will be an update, but not when the terminal starts, but when the ticks come in.
Although, most likely, you mean some other time. For example, time in the journal. But this time cannot be obtained programmatically. And here we are referring exactly to TimeCurrent().
Because if you go to the terminal at the weekend, the time is updated on the date when you logged in and it doesn't matter if there are ticks.
Demonstrate, please. And one more thing: "You're talking about TimeCurrent() - the last known server time, right?". And, by the way, judging by your logic, it is enough to disconnect from Internet (there will be no ticks - imitation weekend), wait 5 minutes, then go to terminal and time is updated in terminal?