ForexCopilotEA

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.

Specification fields behind the two errors
FieldWhat it meansError it causes
DigitsDecimal places in the price10015 or 10016 if prices are not rounded to it
Minimum volumeSmallest lot allowed10014 if the lot is smaller
Maximum volumeLargest lot per order10014 if the lot is larger
Volume stepThe increment lots must follow10014 if the lot is not a multiple of it
Stops levelMinimum distance from price for stop loss, take profit and pending orders10016 if a stop is closer
Freeze levelDistance within which orders cannot be modified or cancelled10029 or modify failures
Contract sizeUnits in one lotNot 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.

Examples of valid and invalid lots (minimum 0.01, step 0.01, maximum 100)
Requested lotResultWhy
0.01ValidEquals the minimum
0.00510014Below the minimum
0.03710014 unless roundedNot a multiple of the step
1.25ValidOn the step
15010014Above the maximum
  1. 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.

  2. Step 2: Compare with the specification

    Check the minimum, step and maximum on the symbol.

  3. 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.

  4. 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.

  5. 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

If the numbers look right but the error persists
CheckWhy
Symbol suffixXAUUSD.m and XAUUSD can have different specifications
Account typeRaw, standard and cent accounts can have different limits
Broker updateBrokers change stops levels around news or for risk reasons
EA versionAn old version may use fixed assumptions
Filling mode10030 is separate, but check it. See filling modes
Trade modeClose-only or disabled symbols give 10017 and related codes
Fix checklist
0/7

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

  1. MQL5 Reference: Trade Server Return CodesWhat the codes returned for a refused trade request mean, including 10027.
  2. MQL5 Reference: Runtime ErrorsMeaning of terminal error codes such as 4752 and 4756.
  3. 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.

Browse Expert Advisors