My robot fails to close positions at market and the error shown in image 1 appears.
It does not recognize the filling method although I have set the preferredFillingType as ORDER_FILLING_FOK. Checking through the generated mql5 code I saw that in the closePosition function the setting request mrequest.type_filling does not appear. I manually added the line (row 1634)
mrequest.type_filling = forceFillingType? PreferredFillingType: GetFilling (correctedSymbol, preferredFillingType);
and the error no longer appears.
I think the problem is that in the specified function does not appear the correct request for the type of execution of the order.
If I'm right, can you solve it? Thank you
Attached:
screenshots of logs (with and without error) and mql5 code (without and with correction);
log files with and without error;
the generated mql5 code file;
the sqx file that generated the strategy.