MT5 AI Assistant trade_send_market_order returns 10030 Invalid fill because filling mode cannot be specified

 

Hello,

I would like to report a reproducible issue with the built-in MetaTrader 5 AI Assistant trading tool.

Environment

·         MetaTrader 5 x64: Build 6140

·         Operating system: Windows Server 2019

·         Account: Demo, hedging mode

·         Server: Demo server (broker name omitted in accordance with forum rules)

·         Symbol: BTCUSD.p

·         AI provider: OpenAI

·         Model: gpt-5.6-sol

·         AI Assistant trading permission: Enabled

Reproduction

The built-in AI Assistant tool “metatrader5: trade_send_market_order” was called with:

·         symbol: BTCUSD.p

·         type: buy

·         volume: 0.01

·         sl: 77000.00

·         tp: 79000.00

·         comment: AI-T12-QA001-BTCBUY

Actual result

·         Retcode: 10030

·         Retcode details: Invalid fill

·         Journal message: Unsupported filling mode

The request was tested twice after refreshing the account and open-position state. Both attempts returned retcode 10030. No position or pending order was created.

Symbol properties

·         Trade mode: full

·         Execution mode: market

·         Filling mode: IOC

·         Minimum volume: 0.01

·         Volume step: 0.01

·         Stops level: 0

·         Freeze level: 0

Tool schema limitation

The AI Assistant tool schema exposes only these order fields:

·         symbol

·         type

·         volume

·         sl

·         tp

·         comment

It does not expose “type_filling”, “filling_mode”, or an equivalent parameter. Therefore, the AI Assistant cannot explicitly select the IOC filling mode required for this symbol.

Control test

On the same demo account and symbol, a minimal MQL5 helper using ORDER_FILLING_IOC successfully opened the same BUY position with retcode 10009 (done). The position was read back, validated, and closed successfully. This confirms that trading is enabled and that the broker accepts IOC for the symbol.

Expected behavior

The built-in trading tool should either:

1.       read SYMBOL_FILLING_MODE and automatically use an allowed filling type; or

2.       expose a type_filling/filling_mode parameter in the tool schema.

Please confirm whether this is a known limitation or a defect in the current MetaTrader 5 AI Assistant implementation.

Attachments

·         Attachment 1 — Built-in AI Assistant response: retcode 10030 / Invalid fill

·         Attachment 2 — MT5 Journal: Unsupported filling mode

·         Attachment 3 — Successful IOC control test: retcode 10009

·         Attachment 4 — Successful close and final state: 0 positions / 0 orders

Thank you.

 
Reported to MQ attention thank you.
 
Thank you for reporting this to MetaQuotes.