Home > Blog > MT5 Order Rejection Retcodes: What to Check First

MT5TroubleshootingEA Operation

MT5 Order Rejection Retcodes: What to Check First

Published: 2026-11-06Read time: about 3 min
⏱ This article reflects information as of its publish date. EA performance figures (PF, DD, annual return) change with live trading and re-validation — check the latest on the EA pages. See the latest EA results →

Bottom line: first check whether it fails every time or only occasionally

When MT5 rejects an EA order, the log shows a number such as "retcode=10030". We receive many questions about these return codes.

Here is the conclusion up front. The first thing to look at is whether the rejection happens every time or only occasionally.

  • Fails every time → Suspect 10030, 10013 or 10018. These are problems with settings or timing, so retrying will never get the order through until you fix the cause or stop sending it.
  • Fails occasionally → Suspect 10004 or 10006. These come from market conditions or the broker's own decisions, so the order may go through if you wait a little.

Which group you fall into changes both where you look and how urgent the problem is.

Recommended Broker Comparison →

🎁 Download Free EA

📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators

* Privacy strictly protected. You can unsubscribe at any time.

How it works: a retcode is the server's reply

When an EA sends an order, the broker's server decides whether to accept it and returns the result as a number. On success you get something like 10009 (order executed); on failure you get a number indicating the reason for rejection.

Keep in mind that this number is only the category the server chose to return. It does not always tell you the real reason for the rejection. 10006 in particular is a code where the log often gives no clue about what the broker actually checked.

CodeMeaning in MT5PatternWhere to checkWill waiting fix it?
10018Market is closedEvery time (depends on time of day)Trading hours, market holidaysGoes through once the market opens
10030Unsupported filling mode specifiedEvery timeEA settings, symbol specificationWill not go through
10013Invalid requestOften every timeLot size, price, symbol nameWill not go through
10004Requote (price changed)OccasionallyAllowed slippage, time of dayOften goes through
10006Request rejectedOccasionally to every timeAsk the brokerUnknown

Checklist: investigate in this order

1. 10018: look at the clock first

This is the easiest to confirm, so check it first. Make sure you are not hitting a weekend, a public holiday, the year-end/New Year break, or a per-symbol break (many brokers have a daily break for gold and stock indices). In Market Watch, right-click the symbol and open "Specification" to see its trading hours. Also be careful about the offset between server time and Japan time. If timing is the cause, the order will go through after the market opens without any action on your part.

2. 10030: match the filling mode

The filling modes a broker accepts (FOK, IOC, Return) differ by broker and account type. If the EA sends an order with a mode that isn't supported, it is rejected every time. If the EA has an input such as "Filling", set it to the mode listed in the "Execution" field of the symbol specification. If there is no such input, the EA itself needs to be fixed, so contact whoever distributes it. This often happens right after you move to a new broker or account type.

3. 10013: suspect the order contents

This usually comes from mistakes in the order itself: a lot size below the minimum, a lot size that doesn't match the lot step, or a wrong symbol suffix (such as ".m" or "#"). The log may not give a detailed reason. In some cases the only option is to try changing the lot size or symbol name bit by bit. We've collected settings to review in How to Set Up an EA.

4. 10004: allowed slippage and time of day

This code tends to appear when prices move fast, such as right after economic releases or in the early morning. If the EA has a "Slippage" or "Deviation" input, widening it slightly can reduce occurrences. But widen it too far and you are accepting fills at unfavorable prices. If a slow connection is also part of the problem, a VPS may help.

5. 10006: sometimes you have to ask the broker

This is a rejection based on the broker's own decision, and the cause is not visible from the user's side. Possibilities include account trading restrictions, a temporary trading halt on the symbol, or limits on sending too many orders, but we can't say for certain which one applies. The most reliable approach is to note the log timestamp and order details and contact the broker's support. If it happens frequently, switching brokers is also an option; Broker Comparison can help you decide.

Limitations and cautions

  • It may not reproduce on a demo account. Order execution is not necessarily the same on demo and live accounts, and requotes and rejections may occur at different rates. Even if everything works on a demo account, we can't say it will go through the same way on a live account.
  • Retrying repeatedly can backfire. Resending the same order will never get 10030 or 10013 through. An EA that resends after every rejection can also flood the broker with orders in a short time, which may trigger the broker's restrictions. Our EAs resend only for temporary codes such as 10004, and only a set number of times.
  • Rejected orders leave no trade record. Backtests rarely produce these rejections, so live results will deviate by that amount. This is one reason live performance doesn't match tester results.
  • Besides the five covered here, there are other return codes for invalid volume, invalid price, insufficient margin and so on. This article is limited to the five we get asked about most.

Summary

  • First check whether it fails every time or only occasionally
  • If it fails every time, investigate in the order 10018 (time) → 10030 (filling mode) → 10013 (order contents)
  • If it fails occasionally, check 10004 (slippage, time of day) and ask the broker about 10006
  • 10030 and 10013 will not go through no matter how many times you resend, so fix the settings
  • The real cause of 10006 may not be visible from the user's side, and we can't pin it down either
  • Passing on a demo account does not guarantee the same result on a live account

📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators

* Privacy strictly protected. You can unsubscribe at any time.

Have a question about EAs or FX?

You can post it on the Nattzy trading forum (free sign-up). Questions beyond this article are welcome too — EA settings, choosing a broker and more.

Ask on Nattzy ↗

Comments & questions