Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Для Digits <= 5 проблема только у этих чисел.
Это обстоятельство, действительно, позволяет сделать очень дешевую распаковку при Digits <= 5.
Unfortunately, your function does not always work correctly.
You are right, we cannot depend on using DoubleAdvance() with 3-digits.
I modified your script a little to show more info.
Results :
/* Checking 10000000 prices (3 digits) for round-trip errors: === (int)(price/point+0.1) * point === Errors: 1339910 (13%), ULPs: 1339866, DoubleAdvance_err: 22 === (int)(price*power+0.1) / power === Errors: 788 (0%) , ULPs: 4 Checking 10000000 prices (5 digits) for round-trip errors: === (int)(price/point+0.1) * point === Errors: 5235948 (52%), ULPs: 5235948, DoubleAdvance_err: 0 === (int)(price*power+0.1) / power === Errors: 108236 (1%) , ULPs: -28 */MOD2 using DoubleAdvance is unreliable.
MOD1 using division by positive powers of 10 gives very low error rate (1%). The overhead of using NormalizeDouble() in these 1% of cases will be low too.
That's way MOD1 should be the fastest / relaible. (One division operation should be faster than calling NormalizeDouble)
Edited:Таким образом, MOD1 должен быть самым быстрым и надёжным. (Одна операция деления должна быть быстрее, чем вызов NormalizeDouble)
Просьба показать свои результаты. У меня MOD1 не дает ускорения.
Please show your results. MOD1 doesn't give me any acceleration.
NormalizeDouble() is executed in 1% of cases, 99% it is a single division (faster than ND also). No need to check !
I tested many times, different symbol (3, 5 digits), longer periods:
MOD1 is faster 10% than the last update.
In your test, I see that the difference in tick count between the two runs is very large, meaning that there was a larger time gap between the runs>I suppose that the second run was in a time with a different system load.
В вашем тесте я вижу, что разница в количестве тиков между двумя запусками очень велика, что означает, что между запусками был больший временной разрыв.
Полагаю, что второй запуск был в период с другой загрузкой системы.Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Библиотеки: TicksShort
fxsaber, 2025.07.24 15:34
Я проверял много раз, разные символы (3, 5 цифр), более длинные периоды:
MOD1 быстрее на 10% по сравнению с последним обновлением.
Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
Библиотеки: TicksShort
fxsaber, 2025.07.21 18:06
Probably CPU and AVX dependent. My config is at the very bottom of the next screenshot.