return(1/значение_функции);
It is better to use
return(-значение_функции);
or you may run into division by zero, and there is less distortion.
It's better to use
or you might get a zero division, and there's less distortion.
Необходимо помнить, что при оптимизации по критерию "Custom max" всегда ищется локальный максимум. Для поиска локального минимума можно из функции OnTester ..........
The word "local" should be replaced by "global". It is the global extremum that is searched for in the given range.
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 a global extremum will be found.
Agreed. Will add to the article, thanks for the suggestion!
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 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?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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