MQL5 documentation inconsistency - Type of Execution vs. Fill Policy

 

@MetaQuotes, there seems to be 2 partially contradictory sources of information with regard to Type of Execution vs. allowable Fill Policy types - the information in both sources differs for IOC and Return fill policies.  Which one is the correct one?



1) MQL5 Reference, namely in https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type_filling and https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#filling_example:

and:

"The ORDER_FILLING_RETURN filling type is enabled at all times except for the "Market execution" mode (SYMBOL_TRADE_EXECUTION_MARKET).

(...)

In case of pending orders, the ORDER_FILLING_RETURN filling type should be used regardless of an execution type (SYMBOL_TRADE_EXEMODE), since such orders are not meant for execution at the time of sending."


2) MetaTrader 5 terminal help, namely https://www.metatrader5.com/en/terminal/help/trading/general_concept#execution_type:

and:

"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."

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
Order Properties - Trade Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Pawel Wojnarowski:

@MetaQuotes, there seems to be 2 partially contradictory sources of information with regard to Type of Execution vs. allowable Fill Policy types - the information in both sources differs for IOC and Return fill policies.  Which one is the correct one?



1) MQL5 Reference, namely in https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties#enum_order_type_filling and https://www.mql5.com/en/docs/constants/environment_state/marketinfoconstants#filling_example:

and:

"The ORDER_FILLING_RETURN filling type is enabled at all times except for the "Market execution" mode (SYMBOL_TRADE_EXECUTION_MARKET).

(...)

In case of pending orders, the ORDER_FILLING_RETURN filling type should be used regardless of an execution type (SYMBOL_TRADE_EXEMODE), since such orders are not meant for execution at the time of sending."


2) MetaTrader 5 terminal help, namely https://www.metatrader5.com/en/terminal/help/trading/general_concept#execution_type:

and:

"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."

I cannot see the contradiction? Don't they imply the same result?
 
Dominik Egert #:
I cannot see the contradiction? Don't they imply the same result?

There is contradictory information even in the tables, in the columns for IOC and Return... please compare both.
And in terms of the text I quoted:

The ORDER_FILLING_RETURN filling type is enabled at all times  enabled at all times except for the "Market execution" mode

vs.

"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."
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...
 
Pawel Wojnarowski #:

There is contradictory information even in the tables, in the columns for IOC and Return... please compare both.
And in terms of the text I quoted:

The ORDER_FILLING_RETURN filling type is enabled at all times  enabled at all times except for the "Market execution" mode

vs.

"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."
I clearly understand what it is saying, and it's not contradictory. But it is phrased difficult.
 
Dominik Egert #:
I clearly understand what it is saying, and it's not contradictory. But it is phrased difficult.

What do you mean and how do you understand it? Could you rephrase it the way you get its meaning?

 
Pawel Wojnarowski #:

What do you mean and how do you understand it? Could you rephrase it the way you get its meaning?

For pending orders, the order filling is return type.

For all other execution modes, the filling can be return type, except for market execution.
 
Got it - thank you for the reply.
Reason: