A lot size that rounds up to one, and a minimum that rounds to zero
My lot sizer floored a size onto the symbol's step, clamped it between the minimum and maximum, then rounded it to a number of decimals. The decimal count came from a lookup that knew only 0.01 and 0.1; every other step got none.
I rebuilt the old function and stepped it over a volume grid. On a 0.001 step, a requested 0.6 came back as 1.0, a requested 0.4 as zero, and the symbol's minimum of 0.001 as zero too, because the clamp runs before the rounding.
The break was not limited to 0.001: 0.02, 0.05, 0.25 and 0.5 steps round the same way. The fix takes the decimals from the step and clamps after the rounding. It is in the header my tools share and in the builds compiled since; the five older builds predate it and keep the old behaviour until each is replaced.
A zero lot comes back as an error; a 1.0 where the risk asked for 0.6 does not. If your volume step is below one lot and not 0.01 or 0.1, compare the size your panel shows with what you asked for before you send the order.


