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

 
Alexey Viktorov:

...Exactly one month before the end of the test. And no matter where you move the computer time... the result will remain the same, one month before the end of the test.

But if there's no way of knowing the end date of the test, then the idea is impossible.

Yes, another option is to know the exact end date of the test. In this case - also all right, but how to find out this date ?
 
George Merts:

Well, how can I put it... Once there was a situation with reselling signals, and now there are clients who use this TS to work on their PAMMs.

This trading system is not very "super-duper profitable", however, its stability is very high. And the main thing - the ability to copy trades from the tester is not convenient to its author. And he suggests that I, as a programmer, should think about ways to solve this problem.

Well, unless it's purely a technical problem. But from the customer's point of view it will still be nonsense.

 
George Merts:
Yes, another option is to know the exact end date of the test. In this case it's OK too, but how do we know this date?

The end date of the test can be put in the future, it doesn't roll.

Try this option: the first run should go without any action, and only with remembering the date of the last tick.
The second run should trade, but only until the desired date (memorized minus a month). Where to remember (and how to encrypt) the date of the last tick is a matter of technique.
The only inconvenience (and so far the least one) - the test must be run twice ;)

 
If so serious, you can get the time from the internet somewhere.
 
George Merts:

Dimitri, the challenge is to stop processing ticks in the tester in advance of the real date. For this you need to know this real date. From the tester it can be found only as written above - by file operation. But, if a sly user moves the time on the computer ahead, the file operation will also give not the real time, but the time shifted forward.

The problem, in fact, is that if the EA is running on timeframe M5 or later (a particular problem on the daily) - it becomes possible to run it in the strategy tester and read the last action, transferring it to another terminal, and not to buy an EA, using only the demo-version.

Artificially prohibit the test on the last N-bars.
 
Dmitry Fedoseev:
If so serious, you could get the time from the internet somewhere.
They say that WebRequest does not work in the tester...
 
Vitalie Postolache:
I wonder if the author of this thread can give at least one example when someone was able to reproduce trades on a real account based on testing results and make profit? With only demo-advisor in the tester and nothing else?
If we set our mind to it, we can copy scalper strategies. What prevents you from tracking a signal from the tester every 2-3 seconds?
 
Dmitiry Ananiev:
If you set your mind to it, you can copy scalper strategies like this. What prevents you from tracking a signal from the tester every 2-3 seconds?
The fact that it is a tester, it a priori works in the past and no matter how hard you try, you can not repeat the transaction under the same conditions and at the same time. But if it is not pips, but long term, then really someone can think of doing so, although there is little point anyway, it's easier to figure out the strategy and repeat.
 
Игорь Герасько:
They say that WebRequest doesn't work in the tester...
Tried it now. It works. Tried in MT4 in tester, in expert.
 
George Merts:
...

The problem is not as simple as it may first appear. The following can be suggested (follow the thought):

  1. The Expert Advisor is compiled with the current date written into it.
  2. The user receives the Expert Advisor and runs it in the strategy tester.
  3. During the first run, the Expert Advisor trades in the Strategy Tester until the date specified in it (or a month before that date, conditions are at author's discretion).
  4. After the date specified in it, he continues to receive quotes by memorizing the time of the last received quote in the strategy tester, but without performing any trading actions.
  5. At the end of testing, it saves the last stored time in a special file.
  6. The record itself is encrypted and therefore, its content cannot be changed in such a way that it would indicate a future date when decrypting the record.
  7. During the next run in the Strategy Tester, the Expert Advisor will read this file, decrypt its content and realize that it has already been run at least up to the date specified therein.
  8. Then, during the second and subsequent runs, it will continue trading to the date specified in the file minus one month.
  9. As it receives new dates in the Strategy Tester or on the real account, it will automatically keep moving after the new history and keep the distance of one month.

From the user's point of view, it will look as follows: the first time, during the run, it will not trade until the end of the selected optimization period for some reason. However, starting from the second run and onwards, its lag will decrease and correspond to one month or so.

In this case the protection can be removed only by complete decryption of the file by finding a key or decompiling the Expert Advisor. Given today's technology and the quality of MQ's protection of their programs, this is virtually impossible. If the user decides to delete the encryption file, the Expert Advisor will create it anew, with the old date of protection in it at compilation, and the user will still not be able to make a trade at the current moment.

What is good, such a method only slightly limits the user's convenience. Re-running the EA will completely fix the too long delay. At the same time, this kind of protection does not require external DLLs, which means it can be distributed in the marketplace. For example, you can create a free version that trades only until a certain date.

Reason: