My broker does not support the ORDER_FILLING_FOK order execution mode for futures market.
The ORDER_FILLING_RETURN or ORDER_FILLING_IOC mode is supported.
Therefore, the strategies made for Metatrader 5 do not do the transaction when testing or auto-trade mode is enabled.
Giving an error - code 4756.
"Error description: Trade request sending filed. The order could not be completed. Error no .: 4756"
By default, when the expert is initialized, as far as I understand, the default order is FOK.
I would like to be able to form a strategy in the UK to handle this error, or at least comment on / fragment the code area, depending on the broker's settings.
By default, when the expert is initialized, as far as I understand, the "type_filling" is ORDER_FILLING_FOK.
The broker recommends using Trade.mqh for setiing ORDER_FILLING_FOK.
For example:
#include<Trade\Trade.mqh> CTrade trade; trade.SetTypeFilling(ORDER_FILLING_RETURN);
But the MT5 system template involves processing different modes, I would like to see this case too.
Preferred order filling type can be now set by modifying the line "const uint preferredFillingType = ORDER_FILLING_FOK;" at the beginning of the EA script. But the EA should now use the right filling type itself as the code has been improved.