Discussion of article "The Fundamentals of Testing in MetaTrader 5"

 

New article The Fundamentals of Testing in MetaTrader 5 is published:

What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When and how are the indicator values calculated during testing, and how are the events handled? How to synchronize the bars from different instruments during testing in an "open prices only" mode? This article aims to provide answers to these and many other questions.

Author: MetaQuotes

 
It should be remembered that when optimising by the "Custom max" criterion, a local maximum is always searched for. To find the local minimum, you can return from функции OnTester the value inverse to the calculated value of the function:

return(1/значение_функции);



It is better to use

return(-значение_функции);

or you may run into division by zero, and there is less distortion.

 
Urain:

It's better to use

or you might get a zero division, and there's less distortion.

Agreed. We will add it to the article, thanks for the suggestion!
 

Необходимо помнить, что при оптимизации по критерию "Custom max" всегда ищется локальный максимум. Для поиска локального минимума можно из функции OnTester ..........

The word "local" should be replaced by "global". It is the global extremum that is searched for in the given range.

 
joo:

The word "local" should be replaced by "global". It is the global extremum that is searched for in a given range.

It is difficult to say. On the one hand, optimisation does not guarantee that the global extremum will be found.
 
Rosh:
It is difficult to say. On the one hand, optimisation does not guarantee that a global extremum will be found.
What will be found, local or global extremum, is another matter. But it is the global extremum that is searched for - that is the whole point of optimisation.
 
Rosh:
Agreed. Will add to the article, thanks for the suggestion!
Added
 
Could you please explain the difference in creating an indicator handle (e.g. Alligator) using iAlligator(...) and IndicatorCreate(...) ?
 
slyusar:
Please explain the difference in creating a handle of an indicator (e.g. Alligator) using iAlligator(...) and IndicatorCreate(...) ?
The handles will not differ "by touch". But this is not the topic of the article.
 
Rosh:
The handles will not differ by "touch". But that's not the subject of this article.

I didn't mean differences by touch.....

You write:

"Whether there is an indicator call in a particular event handler or not, all indicators whose handles were created by iCustom() or IndicatorCreate() will be forcibly recalculated before the event handler function is called."

Question:

Why indicators whose handles were created using (if we go back to Alligator) iAlligator() will not be recalculated, what is the difference from IndicatorCreate() , what is better, what is worse, what should be used and why?

 
Read "All indicators created by functions from Technical Indicators or IndicatorCreate()...".