How to protect yourself against copying long trades from the tester - page 4

 
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?
It seems to be only in five.
 
Alexandr Bryzgalov:
It's only in the five, I think.
yes
 
Alexandr Bryzgalov:

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

As far as I know, you can't access any file at all with standard operations. Only in the "file sandbox".
 
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.

 
George Merts:
As far as I know, you can't access any file at all with standard operations. Only in the "file sandbox".
MT4 has FileOpenHistory
 
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.
 
Alexandr Bryzgalov:
MT4 has FileOpenHistory
Let's try this function... I wonder what the tester will return...
 
George Merts:
Let's try this function... I wonder what the tester will return...
more likely to just open the history file for reading or writing )
 

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.

 
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?