Hello here are some examples if you scroll down the page: https://www.mql5.com/en/docs/constants/tradingconstants/enum_trade_request_actions
And here are the values on the filling type: https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type_filling
When sending a trade request using the OrderSend() function, the filling policy can be set for an order in the type_filling field of the special structure MqlTradeRequest. Values of the ENUM_ORDER_TYPE_FILLING enumeration are allowed. To obtain the value of this property, use the function OrderGetInteger() or HistoryOrderGetInteger() with the ORDER_TYPE_FILLING modifier.
Identifier |
Description |
ORDER_FILLING_FOK |
This filling policy means that an order can be filled only in the specified amount. If the necessary amount of a financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers available on the market at the moment. |
ORDER_FILLING_IOC |
This mode means that a trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. In case the the entire volume of an order cannot be filled, the available volume of it will be filled, and the remaining volume will be canceled. |
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. |

- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello folks, could anyone help me with examples, why in B & MF the FOK, works well, and using Forex only runs the IOC
ORDER_FILLING_FOK
ORDER_FILLING_IOC
ORDER_FILLING_RETURN
Thank you