A trading platform can display a perfectly reasonable position size and still reject the order. In MetaTrader 4, trade volume must fit the broker’s permitted increments, not merely fall below the maximum lot size. The distinction becomes consequential when automated position sizing produces fractions the dealing server will not accept.
For mt4 trading, lot-step errors are particularly disruptive because they can affect entries, protective reductions and repeated execution attempts. Five separate failure points explain why checking the instrument specification matters more than rounding a number to two decimal places.
A Valid-Looking Decimal May Violate the Volume Grid
MT4 exposes minimum volume, maximum volume and volume step through MarketInfo using MODE_MINLOT, MODE_MAXLOT and MODE_LOTSTEP. A broker might allow a minimum of 0.10 lots and increments of 0.10, making 0.30 acceptable but 0.35 invalid. Another symbol might permit 0.01-lot increments.
A request that does not align with the permitted grid can return error 131, invalid trade volume. The number of digits shown in an order field does not establish the accepted step. Automated code should validate the calculated size against all three specifications before sending it.
Risk-Based Sizing Can Produce an Untradeable Quantity
Suppose a hypothetical broker offers a regional construction-materials share CFD with a contract size of 100 shares per lot, a minimum of 0.20 lots and a step of 0.10. An account’s risk formula recommends 0.26 lots for a purchase at $18.50 with a protective exit at $17.70. That quantity represents 26 shares, but the broker accepts 0.20 or 0.30 lots, not 0.26.
If the program rounds upward to 0.30 lots, the exposure becomes 30 shares and the intended $0.80 price risk rises from $20.80 to $24, excluding costs. Rounding downward to 0.20 lots produces 20 shares and $16 of price risk. Repeatedly submitting 0.26 lots instead may leave the strategy with no position at all. The correct choice depends on the strategy’s maximum acceptable risk, not on which rounded value is closest.
Partial Closures Can Leave an Invalid Remainder
An accepted opening size does not guarantee every proposed partial exit is permissible. A position of 0.30 lots on an instrument with a 0.10-lot minimum and step cannot be reduced by 0.25 lots. The requested close volume is off-grid, and the proposed 0.05-lot remainder would also fall below the minimum.
During a sharp decline, a failed reduction can preserve more CFD exposure than the strategy intends. Check both the quantity being closed and the residual position before calling OrderClose; closing the entire position may be the only valid choice when the remaining size would be too small.
Broker-Specific Steps Can Break Reused Expert Advisors
An Expert Advisor tested on a symbol allowing hundredth-lot increments may fail when deployed on a broker requiring tenths. Identical-looking instruments can also have different contract sizes, so a permitted lot quantity does not guarantee equivalent underlying exposure.
For mt4 trading systems copied between accounts, hard-coded values such as 0.01 for the volume increment are a portability hazard. Read the live symbol properties when initializing the strategy and recheck them if trading conditions or instruments change. Test volume calculations separately for each symbol rather than assuming one broker-wide convention.
Blind Retries Can Turn Rejections Into Uncontrolled Orders
A rejected request should trigger diagnosis, not an unlimited retry loop. An algorithm that alternates between invalid quantities, or silently increases volume until acceptance, can miss its entry window or exceed its risk ceiling. Floating-point calculations add another complication: a mathematically valid increment may be represented imprecisely in memory.
Normalize the calculated quantity to the broker’s step using careful numerical handling, then verify it remains within minimum and maximum bounds. Before opening a CFD position, inspect the symbol’s lot specifications, calculate the nearest permissible size without exceeding the risk budget, and test both entry and partial-close quantities in a demo account.



