Oleg Tsarkov: 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?
Oleg Tsarkov: 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.
I tried to get the number of bars in the history and the time of the first bar. Bummer again - the tester only shows data for a year. I cannot calculate the real date of the last quote.
I wonder if the author of this thread can give at least one example when someone was able to reproduce the results of testing and make profit? With only a demo advisor in the tester and nothing else?
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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.