![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Maybe I'm not in the loop, but in OnTesterInit() if you check TimeLocal and TimeGMT, find the difference in days, what time will it show, the real time or the tester time?
It's only in the five, I think.
So is this a normal file operation, or is the tester not allowed to access the history?
I haven't tried it myself, but there are no bans on it in the help
Maybe I'm not in the loop, but in OnTesterInit(), if you check TimeLocal and TimeGMT, find the difference in days, what time will it be, real or tester time?
In this case you will get a tester time which will be the same. No good.
The real time from the tester can only be obtained by a file operation, as mentioned above. But the problem is that this time can be translated forward with malicious intent. You need to get the real time of the last quote from the tester as it lies in the terminal. But I can't figure out how to do that.
As far as I know, you can't access any file at all with standard operations. Only in the "file sandbox".
MT4 has FileOpenHistory
Let's try this function... I wonder what the tester will return...
Fuck you, not the history file !!!
Attempting to open the history file returns error 4059 -"Function not allowed in test mode" .
The question remains open.
It is necessary to find out from the tester the moment of the last real quotation in the terminal.