TROUBLESHOOTING · METATRADER 5

MT5 OrderSend failed

SYMPTOM

The Journal shows OrderSend failed with a numeric retcode and no obvious reason.

Causes, most likely first

1. Retcode 10016 — invalid stops

The stop or target violates the broker's minimum distance, sits on the wrong side, or is misaligned with tick size. Full diagnosis at invalid stops.

2. Retcode 10019 — not enough money

Free margin is insufficient for the requested volume. See not enough money.

3. Retcode 10014 — invalid volume

The lot size breaches the symbol minimum, maximum or step. See invalid volume.

4. Retcode 10018 — market closed

The symbol is outside its trading session. Gold has a daily break and is closed at weekends, and the exact times are in the symbol specification. See market closed.

5. Retcode 10004 or 10015 — requote or invalid price

Price moved between the request and the server receiving it. Increasing the deviation tolerance allows the order through at a slightly worse price; leaving it tight means orders fail during exactly the volatile conditions the strategy was built for.

Why this happens

Every OrderSend failure carries a retcode, and the code is the whole diagnosis. Troubleshooting without reading it is guesswork, and the Journal tab has been recording it the entire time.

The codes cluster differently depending on what is wrong. Constant 10016 from the first order onward is a configuration mismatch with the broker. Intermittent 10004 during fast markets is normal execution behaviour. A sudden run of 10019 means the account has quietly run low on free margin.

On gold specifically, the two that dominate are 10016 and 10019 — the stop level and margin. Both are properties of the account rather than of the strategy, which is why the same EA behaves differently across brokers.

Related problems

All troubleshootingContact support

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