How do I change odd numbers to even numbers?
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.
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)?