A rejected trade means the broker or trading venue did not accept the requested instruction. It is different from a working order that has not filled. Check the exact error message and order history before resubmitting; in some cases an apparent timeout can leave an order’s status uncertain, and repeated submissions can create unintended exposure.
Common MetaTrader 5 return codes
The official MQL5 code list also distinguishes 10008 (order placed), 10009 (request completed), 10010 (partially completed) and 10012 (timeout). A timeout is not a confirmed rejection of every associated execution: reconcile orders, deals and positions before sending another instruction.
The MQL5 return-code reference also distinguishes 10012 (request timeout), 10017 (trade disabled) and 10031 (no connection). A timeout is particularly important: check accepted orders and deals before retrying. MT4 error numbers belong to a separate code system.
| MetaTrader 5 return code | Meaning | First check |
|---|---|---|
| 10014 | Invalid volume | Minimum, maximum and volume step |
| 10016 | Invalid stops | Distance and direction of protective orders |
| 10018 | Market closed | Actual symbol session |
| 10019 | Insufficient money | Equity, free margin and proposed exposure |
| 10026 | Server disables automated trading | Account and server permissions |
| 10030 | Invalid filling type | Supported fill policy |
The identifiers are documented in the official MQL5 trade server return-code reference. Other platforms use different codes and messages. The return code describes the rejection, not necessarily its underlying commercial or operational reason.
Worked example: an invalid quantity
Assume a CFD has a minimum volume of 0.10 lots and volume increments of 0.10. An order for 0.15 lots can be rejected because it is not aligned to the increment. Changing to 0.20 would increase exposure by one-third relative to 0.15; do not round upward automatically. Recalculate risk and consider whether a valid smaller volume fits the intended instruction.
Market hours, permissions and margin
A chart may continue displaying a reference price while the actual contract is closed to new orders. Some instruments permit only position reductions or have a temporary trading restriction. Margin requirements may change around events. Check the exact symbol, session, legal entity and account permissions. An automated strategy can also fail because it uses an unsupported filling mode or sends requests too frequently.
When not to retry
Do not repeatedly submit a timed-out order until the account history confirms whether the first request executed. A broker may also impose rate limits. If a platform is disconnected, consult the native broker application or verified support rather than placing duplicates. Save the response and order timestamp to support a complaint if needed.
Frequently asked questions
Why does a demo accept an order that live rejects? Simulation and live permissions, margin and liquidity may differ.
Can a rejected order cost money? A genuinely rejected instruction does not itself establish a fill; confirm actual account history.
Does increasing leverage fix rejection? Not necessarily, and it increases exposure risks.
Preserve the original rejected request and timestamp. If a request times out, check the account history before sending another order to avoid an unintended duplicate. For related account calculations, see insufficient margin and automatic position closure.
For related practical checks, see MetaTrader connection errors; trade disabled errors; invalid stops errors; market closed errors.
Conclusion
Start with the rejection code rather than guessing. See our insufficient margin guide, unfilled limit order guide and automatic closure guide.
Primary sources
MetaTrader trade history and account measures
Risk information: General education, not personal investment advice. Leveraged positions can produce substantial losses. Examples are hypothetical unless explicitly described as a published tariff.



