TROUBLESHOOTING · METATRADER 5

MT5 invalid volume error

SYMPTOM

Orders are rejected with "Invalid volume" or the lot size is silently changed.

Causes, most likely first

1. The lot size is below the symbol minimum (retcode 10014)

Most brokers set a 0.01 minimum, but some use 0.10 on metals and a few use higher minimums on specific account types. A position-sizing calculation returning 0.004 lots must be rounded up to the minimum or skipped — and rounding up means the trade risks more than you configured.

2. The EA never read the symbol's volume rules

The fix belongs in code rather than in settings. An EA should read SYMBOL_VOLUME_MIN, SYMBOL_VOLUME_STEP and SYMBOL_VOLUME_MAX from the symbol at runtime and clamp its calculated size to them, because all three differ by broker and by account type. Hardcoding 0.01 works until the software meets a broker with a 0.1 minimum. You can read the same three values by hand: right-click the symbol in Market Watch and open Specification.

3. The lot size is not a multiple of the volume step

Volumes must align to the symbol's step, usually 0.01. A calculated 0.037 lots is invalid and must be rounded to 0.03 or 0.04. Read the step from Market Watch → Specification, since a few brokers use 0.1 on gold.

4. The lot size exceeds the maximum per order

Symbols carry a maximum volume per order and often a maximum total exposure. Large accounts hit this and need positions split across multiple orders.

5. You are failing MQL5 Market validation rather than live trading

A distinct case worth separating, because it is what most search results for this error are actually about. The MQL5 Market validator runs an expert advisor across a range of symbols and account configurations, deliberately including ones with unusual volume rules. A product that trades correctly on your own broker fails validation the moment it meets a symbol whose minimum is 0.1 or whose step is not 0.01, because a hardcoded or defaulted lot size is invalid there. The fix is the same clamp described above, applied unconditionally rather than only when a check happens to fail: read minimum, step and maximum from the symbol under test, round the calculated volume down to the step, then clamp it into range, and skip the trade if the result falls under the minimum. Validation passes when the EA never constructs an invalid volume in the first place.

6. The account has a total position limit

Separate from the per-order maximum, some brokers cap the aggregate volume open on one symbol. The rejection looks identical, but it appears only once several positions are already open.

Why this happens

If you have just moved an EA from MetaTrader 4, this is the same failure that appeared there as error 131. The cause is identical and so is the fix — read the symbol's volume rules rather than assuming them — but the number changed, so searching the old code finds nothing.

Volume quantisation is more consequential than it appears, because it puts a floor under risk. If your sizing formula wants 0.004 lots and the minimum is 0.01, your real risk is two and a half times what you configured — and nothing in the platform warns you.

This is the specific reason a "minimum balance" for any gold bot cannot be stated as a single number. The floor interacts with stop distance: a tighter stop lowers the balance at which the minimum stops binding, a wider one raises it.

The lot size calculator shows both the calculated size and whether the broker minimum has overridden it, which is the warning most calculators omit.

Common questions

What is volume step in MT5?

The increment the broker accepts between lot sizes. If the step is 0.01 then 0.03 is valid and 0.035 is not. Every order volume has to sit inside the minimum and maximum AND be an exact multiple of the step, and the rounding must happen before the order is sent.

Why does my bot calculate a lot size the broker rejects?

Because risk-based sizing produces a continuous number and the broker accepts a discrete one. A 1.5% risk calculation might return 0.037 lots; with a 0.01 step that has to become 0.03 or 0.04 first. Round down rather than up — it lowers the risk taken rather than raising it above what you chose.

Related problems

Further reading

MT5 trading botAll troubleshootingContact support

Educational information only, not financial advice. Trading leveraged products carries substantial risk of loss. Last updated 2026-09-04.