Discussion of article "Custom Strategy Tester based on fast mathematical calculations" - page 2

 
And I liked it, if only because there isn't a single article on calculus and the reference has little on the subject.
 
fxsaber:

A good article to start with! Notes

  • It is actually suggested to use a proprietary trading API. Which almost negates the development. It makes sense to have your own tester inside MT5, when the trading API for your tester coincides with the standard one. Otherwise it turns out that you can use some ready-made tester of competitors or the same R with the same benefit.
  • With the mechanism of custom symbols it is not quite clear what such a tester might be needed for.
  • Byte manipulations would be nice to see in a universal form.
  • Comparison of the speed of your tester and the standard one is missing.
  • It is reasonable to use your tester for such a purpose as well

Thanks to the author!

Why FrameNext is used without while?

Your own tester without additional pipelines will be faster than the standard one. Plus research. Plus the possibility of working in a cloude. So it turns out that there are not so many options if we want to use cloud computing very effectively. Of course, you have to pay for everything. And there is no question of using something like this for real trading. But to write something simple and quickly test it is the best thing. Look at the test variant of the strategy on averages - it was written very quickly, but the results even without commissions and slippages are not good. A tester is needed for such tests.

 

For some reason everyone pays attention only to the tester in the article, but nobody has spoken about the analyser yet. And for nothing. I consider the analyser to be no less important and maybe even more interesting than the tester itself. For example, this analyser can be integrated into the testing of a regular strategy tester and get the report format we want.

I would also like to note that thanks to the storage of complete information about each run, it is enough to optimize once and then study the results any way and anywhere you want. This cannot be said about the in-house tester; the information about runs generated by it is very general, and it is impossible to recreate a picture of each run using it.

Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
  • www.metatrader5.com
Тестер стратегий позволяет тестировать и оптимизировать торговые стратегии (советники) перед началом использования их в реальной торговле. При тестировании советника происходит его однократная прогонка с начальными параметрами на исторических данных. При оптимизации торговая стратегия прогоняется несколько раз с различным набором параметров...
 
Vasiliy Sokolov:

Well, how will you use the MetaTrader cloud on Python? Even how do you want to run python script on MT?


We can't use the cloud, but we won't be able to use it for auto-optimisation even with the Expert Advisor running. You can run a python script like this.

I mean, the main point is that the Expert Advisors should be able to optimise themselves, if I understand correctly... not just quickly.
CreateProcess function (Windows)
  • msdn.microsoft.com
Creates a new process and its primary thread. The new process runs in the security context of the calling process. If the calling process is impersonating another user, the new process uses the token for the calling process, not the impersonation token. To run the new process in the security context of the user represented by the impersonation...
 
Maxim Dmitrievsky:

We can't use the cloud, but we can't use it for auto-optimisation even with the Expert Advisor running. To run a Python script like this.

Well, the main point is that the Expert Advisors should be able to optimise themselves, if I understood correctly... not just quickly.

That's a slightly different topic.

 
Vasiliy Sokolov:

That's a little bit of a different topic.


Well, if you think about the ideology... why do we need super fast optimisation if we have to do it by hand anyway?

 
Vasiliy Sokolov:

For some reason everyone pays attention only to the tester in the article, but nobody has spoken about the analyser yet. And for nothing. I consider the analyser to be no less important and maybe even more interesting than the tester itself. For example, this analyser can be integrated into the testing of a regular strategy tester and get the report format we want.

I would also like to note that thanks to the storage of complete information about each run, it is enough to optimize once and then study the results any way and anywhere you want. You can't say that about the standard tester, the information about runs formed by it is the most general, and it is impossible to recreate the picture of each run on it.

There are no statements on this topic from my side, because I implemented such a thing in KB once.

 
Vasiliy Sokolov:

Your own tester without additional pipework will be faster than the standard one. Plus research. Plus the possibility of working in the cloud. So it turns out that there are actually not so many options if we want to use cloud computing very effectively. Of course, you have to pay for everything. And there is no question of using something like this for real trading. But to write something simple and quickly test it is the best thing. Look at the test variant of the strategy on averages - it was written very quickly, but the results even without commissions and slippages are not good. That's what a tester is for.

You don't understand me. You are suggesting to write a TS for testing on your trading API specifically for this purpose. And this is tantamount to using other tester solutions.

And you ignored the point with custom symbols, as well as the comparison of speeds in figures.

 
Vasiliy Sokolov:

As far as I understand, the data will not be lost, because the statistics is collected by another instance of the programme.

They will be lost because this other instance of the programme will not execute OnTesterDeinit.

 
Vasiliy Sokolov:

I don't get it. What is the universal view?

Templates. I've posted something like this in KB.

OnTesterPass is passed to the last run, which loads FrameNext. While is not needed in this case.

OnTesterPass is just a reaction to the event of writing the next frame to the mqd-file.

FrameNext is reading a frame from the mqd-file from the current position and moving this position to the next frame.


Accordingly, if FrameNext is not called at least in one of OnTesterPass, then all subsequent OnTesterPass+FrameNext will receive the previous frame instead of the arrived one.

Since the article is a tutorial, it would not hurt to implement this nuance in the code in the form of the same comments.