Troubleshooting
MT5 Invalid Stops (10016) and Invalid Volume (10014) Errors: Why Your EA's Orders Are Refused and How to Fix Them
By Benjamin Lee · Updated · 6 min read
Two of the most common reasons an Expert Advisor's orders are refused are invalid stops and invalid volume. In the Experts tab they show up as return codes 10016 and 10014. Both come from the same place, the symbol specification, which sets the smallest and largest lot, the lot step, and how close a stop can be to the market price. The EA's author usually tested with one broker's numbers, and yours differ. This guide explains the rules behind each error, shows how to read your own specification, and works through a gold example so you can change the right input.
Key takeaways
- Invalid stops (10016) means the stop loss or take profit breaks the symbol's distance rules.
- Invalid volume (10014) means the lot is outside the minimum and maximum, or not on the lot step.
- Both are decided by the symbol specification at your broker, not by the EA.
- Stops are measured from the current price, and spread matters for buys and sells in different ways.
- Fix the input that matches the rule, then confirm in the Experts tab.
Start with the symbol specification
In Market Watch, right-click the symbol your EA trades and choose Specification. The window lists the numbers that decide whether an order is valid. The ones that matter for these errors are the digits, the minimum volume, the maximum volume, the volume step, the stops level and the freeze level. Write them down for the symbol and the account type you use, because they can differ between standard, raw and cent accounts at the same broker.
| Field | What it means | Error it causes |
|---|---|---|
| Digits | Decimal places in the price | 10015 or 10016 if prices are not rounded to it |
| Minimum volume | Smallest lot allowed | 10014 if the lot is smaller |
| Maximum volume | Largest lot per order | 10014 if the lot is larger |
| Volume step | The increment lots must follow | 10014 if the lot is not a multiple of it |
| Stops level | Minimum distance from price for stop loss, take profit and pending orders | 10016 if a stop is closer |
| Freeze level | Distance within which orders cannot be modified or cancelled | 10029 or modify failures |
| Contract size | Units in one lot | Not an error, but changes risk per lot |
Invalid volume (10014)
The EA asked for a lot that the symbol does not accept. The three common causes are a lot below the minimum, a lot above the maximum, and a lot that is not a multiple of the step. The last one is subtle. If the minimum is 0.01 and the step is 0.01, 0.015 is invalid. If the step is 0.10, only 0.10, 0.20 and so on are valid, so a risk-based EA that computes 0.037 must round to the step before sending.
| Requested lot | Result | Why |
|---|---|---|
| 0.01 | Valid | Equals the minimum |
| 0.005 | 10014 | Below the minimum |
| 0.037 | 10014 unless rounded | Not a multiple of the step |
| 1.25 | Valid | On the step |
| 150 | 10014 | Above the maximum |
Step 1: Find the lot the EA tried
Look at the Experts tab line. Some EAs print the volume, others do not. If not, check the EA's lot or risk inputs.
Step 2: Compare with the specification
Check the minimum, step and maximum on the symbol.
Step 3: Adjust the input
For a fixed lot, type a valid value. For a risk percentage, check the account is large enough for the minimum lot at your stop distance. See lot sizing methods.
Step 4: Check rounding
A well-built EA rounds down to the step and cap at the maximum. If yours does not, ask the seller or use a fixed lot.
Step 5: Check for volume limits
Code 10034 means the total volume on the symbol hit a cap. Reduce size or close positions.
Invalid stops (10016)
The stop loss or take profit is too close to the market, or on the wrong side. The stops level sets a minimum distance, in points, from the current price. If the level is 20 points on a gold symbol with two decimals, a stop must be at least 0.20 price units away. On a buy position, the stop loss sits below the bid price and the take profit above it. On a sell, the stop loss sits above the ask and the take profit below it.
Spread matters because buys are closed at the bid and opened at the ask. A buy order entered at the ask with a stop only a few points below the bid can be too close, because the distance is measured from the price the stop is compared with. This is why an EA with a very tight stop can work with a small spread and fail when the spread widens.
- Stop too tight. Widen the stop beyond the stops level plus a margin for spread.
- Stop on the wrong side. Check the EA does not mix up the direction after a symbol change.
- Wrong points versus pips. A stop typed as 30 can mean 30 points ($0.30 on gold) or 30 pips ($3.00). Check which unit the EA uses.
- Not rounded to digits. A stop of 2315.123 on a symbol with two digits is invalid. The EA must normalise prices.
- Pending orders too close to the market. The same stops level applies to the entry price of pending orders.
- Modifying inside the freeze level. An order near its trigger price may not be modified. Wait or avoid modifications near the price.
A worked example on gold
Suppose XAUUSD has two digits, the stops level is 50 points and the current spread is 30 points. A buy EA with a stop of 0.25 dollars is 25 points and fails with 10016, because 25 is below 50. Setting the stop at 0.80 dollars (80 points) is valid and leaves a margin above the 50-point minimum. At 0.10 lots (10 ounces), that stop risks 8 dollars, about 7 euros, before any slippage. For a mean target of 0.50 dollars, the stops level and spread together make the setup unworkable on this account. The sensible answers are a different account type with a lower stops level, a different EA or a wider stop with a smaller lot. See XAUUSD settings.
Other causes and cross-checks
| Check | Why |
|---|---|
| Symbol suffix | XAUUSD.m and XAUUSD can have different specifications |
| Account type | Raw, standard and cent accounts can have different limits |
| Broker update | Brokers change stops levels around news or for risk reasons |
| EA version | An old version may use fixed assumptions |
| Filling mode | 10030 is separate, but check it. See filling modes |
| Trade mode | Close-only or disabled symbols give 10017 and related codes |
The full list of codes is in our trade return codes guide, and the wider setup is in the MT5 Expert Advisors guide.
Sources and further reading
- MQL5 Reference: Trade Server Return CodesWhat the codes returned for a refused trade request mean, including 10027.
- MQL5 Reference: Runtime ErrorsMeaning of terminal error codes such as 4752 and 4756.
- MQL5 Reference: Trade Request StructureThe magic field an Expert Advisor uses to tag its own orders.
Frequently asked questions
What does invalid stops mean in MT5?
Return code 10016. The stop loss or take profit is closer to the price than the symbol's stops level allows, or on the wrong side. Widen it and check the specification.
What does invalid volume mean in MT5?
Return code 10014. The lot is below the minimum, above the maximum or not a multiple of the volume step. Adjust the lot input to a valid value.
Where do I find the stops level?
In Market Watch, right-click the symbol and choose Specification. The stops level is shown in points, along with the volume limits and the freeze level.
Why does my EA work on demo but fail on live with invalid stops?
The live account may have a larger stops level or a wider spread. Check the specification and the typical spread, and widen the EA's stops.
Is a point the same as a pip?
No. On a five-digit forex pair a pip is ten points. On gold quoted with two decimals, a point is 0.01 and many traders call 0.10 a pip. Check which unit the EA uses.
Expert Advisors in these styles
Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.
Keep reading
- TroubleshootingMT5 Trade Return Codes Explained: 10016, 10019, 10030A plain guide to MT5 trade return codes in the Experts tab: 10004, 10006, 10014, 10016, 10018, 10019, 10027, 10030 and more, with the cause and the fix for each.
- TroubleshootingMT5 Order Filling Modes Explained: FOK, IOC and ReturnMT5 order filling modes explained: Fill or Kill, Immediate or Cancel and Return, how brokers support them, and how to fix the invalid filling type error 10030.
- Pillar guideMT5 Expert Advisors: The Complete Guide for BeginnersEverything about MetaTrader 5 Expert Advisors in one place: how they work, strategy types, risk, backtesting, buying safely, gold, EURUSD, prop firms and Europe.
- Gold EAsXAUUSD EA Settings: Lot Size, Stop Loss, Spread, HoursWhat each XAUUSD Expert Advisor input does and how to size it: lot size, stop loss, spread filter, slippage, trading hours and magic number, with euro examples.


