Yes, Dimitri, you can do it even without WinAPI, just using the script on AutoIT.
Not only Expert Advisors that work on daily periods but even Expert Advisors that work on five-minute periods do not feel comfortable in this case.
In my opinion, the most reasonable solution is to stop the operation of the tester one month before the current date. But what to do when the date is changed on your computer?
The idea I have is to somehow get from the tester the real time of last quotes from the terminal. But I don't know how to do it. Also, I don't want to mess with additional self-written DLL, they also "scare" the clients.
Yes, Dimitri, you can do it even without WinAPI, just using the script on AutoIT.
Not only Expert Advisors that work on daily periods but even Expert Advisors that work on five-minute periods start to feel uncomfortable in this case.
In my opinion, the most reasonable solution is to stop the operation of the tester one month before the current date. But what to do when the date is changed on your computer?
The idea I have is to somehow get from the tester the real time of last quotes from the terminal. But I don't know how to do it. Also, I don't want to mess with additional self-written DLL, they also "scare" the clients.
The date in the terminal does not translate. TimeCurrent() gives the latest server time.
So TimeCurrent() is simulated in the tester... Or am I missing something? You need to know the real current time from the tester, don't you?
In theory, you can use WebRequest, requesting real current time from some server (including your own). And the requirement for strategy test would be to enter the address of this server in the terminal.
So TimeCurrent() is simulated in the tester... Or am I missing something? You need to know the real current time from the tester.
You can get the current time of your computer from the tester.
The only problem is that a user with malicious intent may change it drastically.
Ideally, you could use WebRequest to request the real current time from some server (including your own). And the requirement for the test strategy would be to enter the address of this server in the terminal.
George Merts:
Consequently, it is necessary to get the current date in the tester and only allow the EA to work up to a date that is a month less.
--
[]...there was a clever user who turned out to advance the time on his computer, and quietly read the completed trades from the tester.
Get the time from a third, independent party - either via DLL or WebRequest, as advised above. There are no other options, I suspect.
It is possible to find out the current time of the computer from the tester.
The only problem is that a user with malicious intent can change it drastically.
That's what I'm saying. Except that TimeCurrent() does not work in the tester either.
TimeCurrent() - does not work at all, it does not return the current computer time, but the quote time, which depends on the strategy tester settings.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greetings all.
The question is in the title. The goal is to protect the EA from being used on real data, but still allow it to be run in the strategy tester. So we could run the demo version in the strategy tester and see that it works, but we would not be able to copy trades by transferring them manually to another terminal.
The problem is that Expert Advisor trades can last for weeks. And this means that an unscrupulous user can run a demo version in the strategy tester and open the same trades manually in another terminal a day late. In this case he/she does not lose much profit.
Consequently, we decided that the Expert Advisor must work in the Strategy Tester only until the date one month earlier than the current date. At the same time, when new dates appear, the Expert Advisor must be allowed to work in the Strategy Tester for a longer and longer time.
A fixed date of the end of work in the tester is not good - users suspect that the quotes are stored in the Expert Advisor exactly until this date, which is why it works. Therefore, we need to get the current date in the Strategy Tester and allow the Expert Advisor to work only until the date, which is a month earlier.
It is hard to get the current date from the tester, but we have managed to do it. However, we found a clever user turning the time on his computer forward and easily reading performed deals from the Strategy Tester.
How can I prevent the tester from running on last month's quotes ?
What do you suggest to do, colleagues ?