Особенности языка mql5, тонкости и приёмы работы - страница 232
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Explanation of the definition of DBL_EPSILON:
This is a bad explanation, because
Another way to explain the meaning of DBL_EPSILON:
DBL_EPSILON is just the gap size between consecutive doubles in [1,2).
https://www.exploringbinary.com/the-spacing-of-binary-floating-point-numbers/
https://en.wikipedia.org/wiki/Machine_epsilon
To better understand DBL_EPSILON, consider incrementing a floating-point counter:
if the initial value of the counter is 1.0, the step size (epsilon) of the counter will be 2.220446049250313e-16 (DBL_EPSILON) ≈ 2 at the 16th decimal place.
/* 1.0000000000000002 1.0000000000000004 1.0000000000000007 1.0000000000000009 1.000000000000001 1.0000000000000013 1.0000000000000016 1.0000000000000018 1.000000000000002 1.0000000000000022 */
If the initial value of the counter is 1024, the step size (epsilon) of the counter will be 2.273736754432321e-13 (1024 * DBL_EPSILON) ≈ 2 at the 13th decimal place.
/* 1024.0000000000002 1024.0000000000005 1024.0000000000007 1024.000000000001 1024.0000000000011 1024.0000000000014 1024.0000000000016 1024.0000000000018 1024.000000000002 1024.0000000000023 */
If the initial value of the counter is 4503599627370496 (2^52), the step size of the counter will be 1.0 (2^52 * DBL_EPSILON) = 1. At this range, a double behaves like an integer counter, no fractions could be representable.
/* 4503599627370497.0 4503599627370498.0 4503599627370499.0 4503599627370500.0 4503599627370501.0 4503599627370502.0 4503599627370503.0 4503599627370504.0 4503599627370505.0 4503599627370506.0 */
You can see that the smaller numbers have smaller gaps between them, and the larger numbers have larger gaps between them.
Therefore, DBL_EPSILON is the relative error rate. relative means relative to the magnitude of the number.
at 1.0, the absolute error = 1 * 2.2204460492503131e-016 (DBL_EPSILON)
at d, the absolute error ≈ d * DBL_EPSILON.
(DBL_EPSILON is a reference rate at 1.0, something like the bank's annual interest rate, and it is equal to 2^-52).
A side-note: if you try to print 1024.0000000000003, it will print 1024.0000000000002 instead (rounding to the nearest representable number), because 1024.0000000000003 is not a representable number (non-existing fp number).
This is called a representation error:
The previous/next representable numbers are reached at through bit manipulation (enum as before: DoubleAdvance(value, -1)) or by using DBL_EPSILON:
DBL_EPSILON is mainly used to estimate (or correct) fp round-off errors after mathematical operations on doubles (numerical analysis):
|true result - fp result| / true result <= DBL_EPSILON
Отключается ли в MT5-тестере при генетическом алгоритме оптимизации и НЕ пользовательском критерии оптимизации вызов OnTester()?
Мне кажется - нет. А хотелось бы... Желательно без парсинга конфигов.
PS. КАРАУЛ!!! Всё пропало! При каждом проходе оптимизации (надо/не надо) - вызывается OnTester(), что может сильно увеличивать общее время оптимизации!
Поможите кто чем может... )))))
в поиске наткнулся на интересную недокументированную функцию
можно скрыть input комментарий для диалогового окна
оригинальный пост тут
https://www.mql5.com/ru/forum/1271#comment_9019
в поиске наткнулся на интересную недокументированную функцию
можно скрыть input комментарий для диалогового окна
оригинальный пост тут
https://www.mql5.com/ru/forum/1271#comment_9019
В Тестере в History-таблицу идет дозапись только в двух случаях.