MT5 Filling Options Explained

 

Hi,

On MT5 when an EA is loaded and on inputs panel there are 4 options for the Filing of Orders (i have listed them below)

But can someone please explain the difference between all 4?

there is
1 - Order_Filling_FOK
2 - Order_Filling_IOC
3 - Order_Filling_Return
4 - Order_Filling_BOC

Many thanks

 

You should really be asking the author for support and not here. You are a seller, so you should know this.

However, since is for something very common, here are some details (when in doubt, read the documentation):

Basic Principles - Trading Operations - MetaTrader 5 Help

Fill Policy

In addition to common rules of order execution set by a broker, a trader can indicate additional conditions in the "Fill Policy" field of the order placing window:

  • Fill or Kill (FOK)
    This fill policy means that an order can be filled only in the specified volume. 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 by several offers available in the market at the moment.
  • Immediate or Cancel (IOC)
    In this case a trader agrees to execute a deal with the volume maximally available in the market within that indicated in the order. In case the order cannot be filled completely, the available volume of the order will be filled, and the remaining volume will be canceled. The possibility of using IOC orders is determined on the trade server.
  • Book or Cancel (BOC)
    The BOC policy indicates that the order can only be placed in the Depth of Market (order book). If the order can be filled immediately when placed, this order is canceled. This policy guarantees that the price of the placed order will be worse than the current market. BOC is used to implement passive trading: it is guaranteed that the order cannot be executed immediately when placed and thus it does not affect current liquidity. This fill policy is only supported for limit and stop limit orders.
  • Return
    This policy is only used for market (Buy and Sell), limit and stop limit orders. If filled partially, an order with the remaining volume is not canceled, and is processed further. For market orders, the Return policy is used only in the Exchange Execution mode, while for limit and stop limit ones, it is applied in the Market Execution and Exchange Execution modes.

Use of fill policies depending on the execution type can be shown as the following table:

Type of Execution/Fill Policy

Fill or Kill

Immediate or Cancel

Book or Cancel

Return

Instant Execution

+

Request Execution

+

Market Execution

+

+

+

Exchange Execution

+

+

+

+

 

Basic Principles - Trading Operations - MetaTrader 5 Help
  • www.metatrader5.com
Before you proceed to study the trade functions of the platform, you must have a clear understanding of the basic terms: order, deal and position...