Fix unsupported filling mode in an MQL5 EA

An unsupported filling policy can cause a trade request to be rejected even when the symbol and lot size are valid. FOK, IOC and Return are execution policies, not interchangeable labels.

Check the symbol contract

Inspect the symbol’s execution mode and supported filling flags. Avoid copying a numeric enum value from an unrelated account. A market request and a pending order may need different handling.

Use the platform helper deliberately

When using CTrade, SetTypeFillingBySymbol can choose a policy from the symbol’s settings. Check its result and the subsequent trade result. A successful configuration step is not evidence of a completed trade.

Compare two small test cases

Keep a record of symbol, request type, requested filling policy and returned code. Verify the correction on the same broker environment that produced the error, then check any other supported broker separately.

Make portability a visible feature

A well-organised source project places broker-specific execution handling in one place. That makes future changes easier to understand than repeatedly editing every order call.

Reference and further reading

Start with a free editable EA project · Explore MQLume source code

Back to top

Inspect the source projects

Review the delivered release, input guide and documented testing scope for each package.

Quantum Titan MT5The Gold Reaper MT5My AI Gold MT5Ultimate Breakout System MT5Quantum Commander MT5MoonDog EA MT5EA Super Trend XAUUSD MT5Gold Beaver MT5Smart Gold Hunter MT5

Cart

One personal-use licence per project. Each project can be added once.

Your cart is empty

Choose a source project to get started.

Continue shopping