how to get ORDER_FILLING_MODE from symbol_info

 

Hello, I tried to get the ORDER_FILLING_MODE from symbol_info:

symbol_info_dict = mt5.symbol_info(symbol)._asdict()
mode = symbol_info_dict['filling_mode']

This gives me 2 as result and if I got it correct it is like this:

0 =  ORDER_FILLING_FOK
1 =  ORDER_FILLING_IOC
2 =  ORDER_FILLING_RETURN

but if I look into specifications of my symbol in MT5 it says it is ORDER_FILLING_IOC (also when I test it with placing an order it is IOC and RETURN throws an error)

Now my question simply is, is the output of symbol_info_dict['filling_mode'] wrong or does it begin counting with 1? If it was second, I could just calculate mode - 1 to get the correct result.

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