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.

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. 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. 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. 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 locallyRequest a free demo of your fix
Related checks
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
- Official MQL5 trade-server return codes
- Official symbol filling flags and execution-policy table
- Observed question: flags confused with enums, then corrected
- Observed trader question behind this guide
These public questions explain the error; use your own EA log to check whether the same cause applies.