The easiest solution is to use NormalizeDouble() to round the lot size to required precision. A better solution would be to use MathMod() in tandem with MarketInfo( Symbol(), MODE_LOTSTEP ). Whichever makes more sense in your situation.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
My lotsize calculation on a mini account might result in an 2-decimal double odd number such as .67 or 2.51.
How would I determine if the number is odd and change it down to the nearest even number (such as .66 and 2.50)?