ORDER_FILLING_FOK

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.

Attachments
No attachments
  • Votes 0
  • Project StrategyQuant X
  • Type Bug
  • Status Fixed
  • Priority Normal

History

?
#1

anonymous

25.07.2017 19:53

Task created

TB
#2

Tomas Brynda

14.08.2017 09:44

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.

TB
#3

Tomas Brynda

14.08.2017 09:44

Status changed from New to Fixed


Votes: 0

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please