Strategy testing and trading software · Germanycontact@stratcorealpha.com · DE
All trading software errors

MT5 · code and request checks

MT5 error 10006: keep the rejection before trying again

Your EA can receive a rejection without learning its cause. In my MT5 test, 3 synthetic return-code checks passed and no orders were sent. I keep rejection, placement and completion separate before considering another request.

Native MT5 chart showing three synthetic return-code classifier checks passed, zero orders and no reproduced server rejection.

Arnold Holm · 2026-10-17

What the error means

A trader asked how to check a failed order and send it again. The reported code was 10006, with no useful explanation in the journal. That is a good reason to preserve the complete result. It is not enough evidence to choose a new entry price, widen a setting or retry on every tick. An EA is a program that applies your trading rules; it also needs a clear rule for an uncertain execution result. The official return-code table calls 10006 a rejected request. That label does not identify one universal broker cause. Keep the returned comment and any external return code beside the request, including its symbol, type, volume and timestamp. If those fields do not explain the rejection, preserve the uncertainty rather than writing a cause into the log. A true return from OrderSend is not itself proof that a market trade completed. The result and later transaction events need checking. In particular, an order being placed and a request being completed are different states. A local classifier can keep those states distinct. It cannot discover a broker's missing explanation.

Three code paths to check

  1. 1. A short label hides the result.

    A log line that says only rejected loses the fields needed for the next check. Keep one timestamped record for the submitted request and its returned result. Give it a local identifier so later order and deal events can be matched to that request. A screenshot of the current chart cannot replace those earlier values.

  2. 2. Placement is mistaken for a fill.

    The tested example treats synthetic 10008 as placed, not filled. It treats synthetic 10009 as completed, with a separate reminder to reconcile the deal. Do not turn a general function success flag into a claim about an account position. Check the relevant order, deal and position state for the operation you actually requested.

  3. 3. An automatic retry skips reconciliation.

    Another request needs its own decision. First establish whether the earlier operation is rejected, still processing or reflected in history. Keep the original trading intent distinct from its attempts. Reusing a signal without checking the earlier attempt can produce an unintended second entry. This example deliberately contains no retry loop.

Three synthetic states in native MT5

I compiled and ran an original script in native MT5. It supplied three fixed numbers to the classifier. The runtime log retained 10006 as rejected with an unknown reason, 10009 as completed with a reconciliation reminder, and 10008 as placed but not filled. All three comparisons passed. The compiler log and native chart capture accompany the run. These inputs were chosen examples. The script called neither OrderSend nor OrderCheck. The EURUSD chart was only the capture surface. This is a small check of local result handling, not a test of a broker's response, network delay or an EA's complete execution logic.

string Classify(uint code) {
 if(code==TRADE_RETCODE_REJECT) return "REJECTED_REASON_UNKNOWN";
 if(code==TRADE_RETCODE_DONE) return "COMPLETED_RECONCILE_DEAL";
 if(code==TRADE_RETCODE_PLACED) return "PLACED_NOT_FILLED";
 return "UNCLASSIFIED_RECONCILE";
}

Zero account orders. No server rejection reproduced. No broker cause established. Three synthetic classifier cases, not a complete order-state machine.

How you know it is fixed

Rejection stays a rejection

Synthetic 10006 remains rejected with reason unknown. It does not become a fabricated spread, stop or margin diagnosis.

Placed stays separate from completed

Synthetic 10008 and 10009 take different paths. Neither input alone proves a particular account position.

Your five-minute result check

Open one rejected request and compare its returned code, comment, order and deal fields with its original request and timestamp. Check whether your log retained the full result or only a short label. If the reason is absent, keep it unknown. Do not silently replace that missing evidence with a retry assumption.

Your own source

Find the next line to check

Start with the free EA-Check. Your code stays in your browser. It highlights patterns with line numbers; it does not prove the broker accepts an order.

Check my EA locally

Want one small change shown on your own case?

SOLVED-FIRST: one small fix or change to your own case, shown first as screenshots or a short screen video. 15 USD fixed (or the higher platform minimum), first five paid orders only during 4–17 October 2026. The file follows within 24 hours after funding. Close on Upwork first; marketplace cases stay on their marketplace.

Outside that sprint: R49: one authorised, reproducible MT4/MT5 defect in readable source up to 500 lines, with three agreed cases. 49 USD fixed. Delivery within 48 hours after source review and funding. The exact case is agreed before funded work.

Send the expected and actual behaviour

Common questions

Does 10006 tell me which setting to change?

No. It labels the rejection. Inspect the complete result and request before choosing a correction.

Did this run reproduce a broker rejection?

No. It tested three chosen return codes in a local classifier. It sent no account orders.

Sources and limits

These public questions explain the error; use your own EA log to check whether the same cause applies.

Trading risk disclosure

Futures and forex trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing one's financial security or lifestyle. Only risk capital should be used for trading, and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results.

Hypothetical performance disclosure

Hypothetical performance results have many inherent limitations. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. There are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program. Hypothetical results are generally prepared with the benefit of hindsight, do not involve financial risk, and cannot completely account for the impact of financial risk in actual trading. Market conditions, the ability to withstand losses, and adherence to a trading program can all materially affect actual results.

NinjaTrader trademark disclosure

NinjaTrader® is a registered trademark of NinjaTrader Group, LLC. No NinjaTrader company has any affiliation with the owner, developer, or provider of the products or services described herein, or any interest, ownership or otherwise, in any such product or service, or endorses, recommends or approves any such product or service.

Testimonials, when shown, may not represent the experience of other clients and are not a guarantee of future performance or success. Virtual-currency trading carries additional risks. See the CFTC customer advisories. Read the full financial risk disclaimer.