Your strategy as an MT5 bot · Daily-loss lock built incontact@stratcorealpha.com · DE
All trading software errors

MT5 · code and request checks

MT5 error 10030 unsupported filling mode

Your EA can stop before sending an unsupported filling choice: my policy 3 failed the check, while policy 1 passed. The symbol flags describe allowed choices. They are not the order policy itself. My helper sent no orders.

Actual HolaPrime MT5 script screenshot: symbol flags3 cast to policy3 rejected, intended IOC policy1 accepted, pending request blocked, zero orders sent.

Arnold Holm · 2026-10-04

What the error means

I choose the intended order policy by name and check whether the current symbol permits it. Open one failed request in your Journal and compare its filling policy with the symbol filling flags and execution mode. I started with the shortcut that causes this mix-up: read the filling flags, cast that number to an order policy, and assume both lists use the same numbers. I compiled the page’s helper in HolaPrime MT5 and called it on an immediate EURUSD BUY request. The symbol reported flags 3 and Market Execution. The cast produced policy 3. The helper refused it and left the request alone. I then asked for IOC by its order-policy name. That choice produced policy 1 and passed the symbol check. Finally I changed the request to a pending order. The same helper stopped that path. You can see all three decisions in the screenshot and the saved log, with zero orders sent. The lesson is small: choose the policy your rule needs, then check whether this symbol allows it. Copying a number from a symbol property skips that decision. 10030 is TRADE_RETCODE_INVALID_FILL: the server rejected the requested filling policy. An EA is a program that applies your trading rules in MetaTrader. This error concerns its order request, not whether the trading rule would make money.

Three code paths to check

  1. 1. Symbol flags used as an order enum

    SYMBOL_FILLING_MODE is a bitmask. Test it with SYMBOL_FILLING_FOK or SYMBOL_FILLING_IOC, then assign the matching ORDER_FILLING enum. Casting the whole bitmask to ENUM_ORDER_TYPE_FILLING mixes two different sets of values.

  2. 2. A policy copied from another symbol or account

    Read both SYMBOL_TRADE_EXEMODE and SYMBOL_FILLING_MODE for the actual request symbol. For an immediate market order, RETURN is not allowed under Market Execution. A setting that worked elsewhere is not evidence for this symbol.

  3. 3. The market-order path reused for a pending order

    Pending orders use RETURN under the documented standard pending-order path. Keep that path separate from immediate BUY/SELL deals. Passive Book-or-Cancel orders need their own constraints and are outside the small pattern below.

Own pattern: validate the intended policy without sending an order

Pass the policy your rule actually needs. This helper leaves the request unchanged if that policy is not allowed or the symbol properties cannot be read. It does not switch silently from full-volume FOK to partial-volume IOC, retry a rejected request or place a trade.

bool TrySetDealFilling(MqlTradeRequest &request,
                       ENUM_ORDER_TYPE_FILLING intended)
{
   if(request.action != TRADE_ACTION_DEAL ||
      (request.type != ORDER_TYPE_BUY &&
       request.type != ORDER_TYPE_SELL)) return false;

   long execution = 0, flags = 0;
   if(!SymbolInfoInteger(request.symbol, SYMBOL_TRADE_EXEMODE, execution) ||
      !SymbolInfoInteger(request.symbol, SYMBOL_FILLING_MODE, flags))
      return false;

   bool allowed = false;
   if(intended == ORDER_FILLING_RETURN)
      allowed = execution != SYMBOL_TRADE_EXECUTION_MARKET;
   else if(intended == ORDER_FILLING_FOK || intended == ORDER_FILLING_IOC)
   {
      if(execution == SYMBOL_TRADE_EXECUTION_INSTANT ||
         execution == SYMBOL_TRADE_EXECUTION_REQUEST)
         allowed = true;
      else if(execution == SYMBOL_TRADE_EXECUTION_MARKET ||
              execution == SYMBOL_TRADE_EXECUTION_EXCHANGE)
      {
         long flag = intended == ORDER_FILLING_FOK
                     ? SYMBOL_FILLING_FOK : SYMBOL_FILLING_IOC;
         allowed = (flags & flag) == flag;
      }
   }
   if(!allowed) return false;
   request.type_filling = intended;
   return true;
}

This read-only EURUSD H1 script checks the shown request or signal path; your full EA still needs its own inputs, account checks and execution log.

How you know it is fixed

When it should continue: IOC-only Market Execution symbol

With the IOC symbol flag set, the helper accepts intended IOC and sets ORDER_FILLING_IOC. Record the symbol properties and resulting request; do not interpret the flag value as the order enum.

When it should stop: RETURN under Market Execution

The helper returns false and leaves type_filling unchanged. The caller stops this path rather than cycling through policies and risking an unintended retry.

Another case: pending order or missing properties

The helper returns false. Use the separate pending-order path or resolve the property read. After a complete demo request, inspect the retcode and the actual order or position, not just a successful function call.

I can fix it for you

If the three agreed tests don't pass, you get your money back. I fix one authorised, reproducible MT4 or MT5 defect in readable source up to 500 lines. The fixed price is 49 USD. Delivery is within 48 hours after source review and funding.

Free demo of your fixCheck my EA locally

Request a free demo of your fix

I use your email to reply about this fix. Privacy policy

Common questions

Should I force IOC for every 10030 error?

No. Check the actual symbol, execution mode, order type and whether your rule allows partial fills. Replacing the policy everywhere can change what your program does.

Does a clean EA-Check prove this is fixed?

No. The free checker finds source patterns only. A complete request still needs compilation, the three agreed cases and an observed order or position state.

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.