What happens if a market order gets partially executed using ORDER_FILLING_RETURN?

 

Hi all.

What happens if a market order gets partially executed using ORDER_FILLING_RETURN?

Suposing my buy market order had 10 volume and the first level of ask price has only 5 volume. Does the market order will buy 5 in first ask price and the rest on following available ask prices until complete my order? Or will buy only 5, and in this case what happens?

The documentation (https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties) says:

ORDER_FILLING_RETURN

This policy is used only for market orders (ORDER_TYPE_BUY and ORDER_TYPE_SELL), limit and stop limit orders (ORDER_TYPE_BUY_LIMIT, ORDER_TYPE_SELL_LIMIT, ORDER_TYPE_BUY_STOP_LIMIT and ORDER_TYPE_SELL_STOP_LIMIT ) and only for the symbols with Market or Exchange execution. In case of partial filling a market or limit order with remaining volume is not canceled but processed further.

For the activation of the ORDER_TYPE_BUY_STOP_LIMIT and ORDER_TYPE_SELL_STOP_LIMIT orders, a corresponding limit order ORDER_TYPE_BUY_LIMIT/ORDER_TYPE_SELL_LIMIT with the ORDER_FILLING_RETURN execution type is created.


It says remaining volume will be processed further, but this is not clear. What does this "processed further" mean?

Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
Documentation on MQL5: Constants, Enumerations and Structures / Trade Constants / Order Properties
  • www.mql5.com
Requests to execute trade operations are formalized as orders. Each order has a variety of properties for reading. Information on them can be obtained using functions Position identifier that is set to an order as soon as it is executed. Each executed order results in a deal that opens or modifies an already existing position. The identifier of...
Reason: