MetaTrader 5 error 10014 · TRADE_RETCODE_INVALID_VOLUME
Invalid volume: the lot size is below the minimum, above the maximum, or not a multiple of the volume step.
Check an order against MetaTrader 5 rules before sending it (free)
What the venue says
- Invalid volume in the request
Source: trade server return codes (MqlTradeResult.retcode), read 2026-11-28. Market: all.
Usual causes
- Lots not rounded to SYMBOL_VOLUME_STEP
- Lots below SYMBOL_VOLUME_MIN (e.g. 0.001 when min is 0.01)
- Lots above SYMBOL_VOLUME_MAX or a computed risk size that is too big
How to fix it
- Read SYMBOL_VOLUME_MIN, SYMBOL_VOLUME_MAX and SYMBOL_VOLUME_STEP at runtime (never hard-code)
- Round lots DOWN to the step, then clamp to min/max
- Skip the trade if the rounded size is below the minimum
Round lots to the symbol's volume step and limits
double NormalizeLots(const string sym, double lots)
{
double step = SymbolInfoDouble(sym, SYMBOL_VOLUME_STEP);
double vmin = SymbolInfoDouble(sym, SYMBOL_VOLUME_MIN);
double vmax = SymbolInfoDouble(sym, SYMBOL_VOLUME_MAX);
if(step <= 0.0) return 0.0;
lots = MathFloor(lots / step + 1e-9) * step; // round DOWN to the step
if(lots < vmin) return 0.0; // too small: skip the trade
if(lots > vmax) lots = vmax;
return NormalizeDouble(lots, 8);
}Also known as: invalid volume, wrong volume.
Stop this error before the order leaves your bot
The free order check tests size, price, tick, lot step and venue rules for one order and returns the venue error code it would hit. The free EA code check reads MQL5 and Python bot code for the rule checks that stop codes like this one. Both are free; the full EA list is US$19 with a 30-day refund.
Free order check Free EA code check
This page explains an error message. It is information for developers, not financial advice and not a recommendation to trade. Codes and texts come from the venue's official documentation on the date shown; venues change them, so check the source before relying on it. Register built 2026-11-28; the receipt id for this entry is rcp_d469fc64033646e1a89b.