TRADE_RETCODE_INVALID_VOLUME (10014): Invalid volume in the request
MetaTrader 5 returns retcode 10014 when the lot size in your order request breaks the symbol's volume rules: below SYMBOL_VOLUME_MIN, above SYMBOL_VOLUME_MAX, or not a multiple of SYMBOL_VOLUME_STEP.
What the official docs say
MQL5 docs, trade server return codes: "10014 TRADE_RETCODE_INVALID_VOLUME - Invalid volume in the request". Symbol properties SYMBOL_VOLUME_MIN / MAX / STEP are in the MQL5 docs; the MQL5 article 2555 shows a volume check with the same three rules.
Three common causes
- The lot is below SYMBOL_VOLUME_MIN (many brokers use 0.01, some 0.1 or 1).
- The lot is not a multiple of SYMBOL_VOLUME_STEP, for example 0.015 on a 0.01 step.
- Different symbols on the same account have different limits, so a lot that works on EURUSD fails on gold or an index.
How to fix it
- Read SYMBOL_VOLUME_MIN, SYMBOL_VOLUME_MAX and SYMBOL_VOLUME_STEP with SymbolInfoDouble for the symbol you trade.
- Clamp the lot into [min, max].
- Round to the step with MathFloor (not MathRound if you must not exceed your risk).
- Normalise with NormalizeDouble to the number of step decimals, then send.
MQL5 example (runs as shown with sample numbers):
double FixVolume(const string sym, double lots)
{
double vmin = SymbolInfoDouble(sym, SYMBOL_VOLUME_MIN);
double vmax = SymbolInfoDouble(sym, SYMBOL_VOLUME_MAX);
double vstep = SymbolInfoDouble(sym, SYMBOL_VOLUME_STEP);
if(vstep <= 0.0) return 0.0;
double v = MathFloor(lots / vstep + 1e-9) * vstep;
if(v < vmin) return 0.0; // too small: do not trade
if(v > vmax) v = vmax;
int digits = (int)MathMax(0.0, MathCeil(-MathLog10(vstep) - 1e-9));
return NormalizeDouble(v, digits);
}
What the official docs say
| Item | Official wording | Number in the docs | Source and read date |
|---|---|---|---|
| SYMBOL_VOLUME_MIN | Minimal volume for a deal | - | Official docs, read 2026-11-16 |
| SYMBOL_VOLUME_MAX | Maximal volume for a deal | - | Official docs, read 2026-11-16 |
| SYMBOL_VOLUME_STEP | Minimal volume change step for deal execution | - | Official docs, read 2026-11-16 |
Check your numbers
Type your symbol's volume limits (Market Watch, right-click the symbol, Specification) and your lots.
Look up MT5 return codes and symbol properties by API: AIKIT (free 1,000 calls)
Disclosure: AIKIT is our own product. It returns sourced exchange and broker rules (with the official source and read date) and checks bot code against them. Facts and checks only, not advice.
Questions people ask
What does MT5 error 10014 mean?
Invalid volume: the lot size in the request is outside the symbol's minimum, maximum or step.
Why does the same lot work on one symbol and fail on another?
Each symbol has its own SYMBOL_VOLUME_MIN, MAX and STEP.
Should I round the lot or floor it?
Floor it, so you never trade more than you planned.
Sources
- https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants (read 2026-11-16)
- https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes (read 2026-11-16)
Exchange rules change; read the live values from the venue before you trade.
Related fixes
- TRADE_RETCODE_INVALID_STOPS (10016): Invalid stops in the request (MetaTrader 5)
- TRADE_RETCODE_INVALID_FILL (10030): Invalid order filling type (MetaTrader 5)
- Filter failure: LOT_SIZE (Binance spot)
- Filter failure: NOTIONAL (Binance spot)
All error fixes. General information for education only. It is not financial advice, and trading can lose money.