
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
And it's not really clear how arrays or switch fall down there. It's pure mathematics.
What's almost four times faster? Give me the code!
In the kodobaza for an inspection for an unknown number of days. The inspector is probably on holiday.
I think they started posting it today. Maybe they will reach us too ))))
What's almost 4 times faster? Code, please!
https://www.mql5.com/ru/code/16169
https://www.mql5.com/ru/code/16169
Be careful when using this function, it will work correctly on a smaller range of values than NormalizeDouble.
I won't explain why - guess for yourself.
The NormalizeDouble function works :
Be careful when using this function, it will work correctly on a smaller range of values than NormalizeDouble.
I won't explain why - guess for yourself.
The NormalizeDouble function works :
The function description contains the following note
Calculated StopLoss and TakeProfit values, as well as values of open prices for pending orders should be normalized with the accuracy that can be obtained byDigits().
This is only true for symbols that have a minimum price step of 10^N, where N is an integer and not positive. If the minimum price step has a different value, then normalizing the price levels before OrderSend is a meaningless operation, which in most cases will result in the return of false OrderSend.
NormalizeDouble is completely discredited. Not only is the implementation retarded, it's also meaningless on multiple exchange symbols (e.g. RTS, MIX, etc.).
As for the alternative implementation presented, it is as accurate as the original for both positive and negative. And it does rounding in the same way. Only it works 4 times faster.
This is only true for characters that have a minimum price step of 10^N, where N is an integer and not positive. If the minimum price step has a different value, then normalizing the price levels before OrderSend is a meaningless operation, which in most cases will cause false OrderSend to be returned.