There is invalid fill in Expert Tab got solution but dont know what to do further

 

I want to ask question that There is invalid fill in Expert Tab i got solution but dont know what to do further.That is where to put this coding.I saw this link https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes

10030 TRADE_RETCODE_INVALID_FILL Invalid order filling type
and you must read about FOK


ENUM_ORDER_TYPE_FILLING
https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties

As i said earlier where i have to put this  in the settings of "fill or cancel" in fill policy. I cannot change this setup.

Documentation on MQL5: Standard Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes
  • www.mql5.com
Standard Constants, Enumerations and Structures / Codes of Errors and Warnings / Trade Server Return Codes - Documentation on MQL5
 
akshay2kokate:

I want to ask question that There is invalid fill in Expert Tab i got solution but dont know what to do further.That is where to put this coding.I saw this link https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes

10030 TRADE_RETCODE_INVALID_FILL Invalid order filling type
and you must read about FOK


ENUM_ORDER_TYPE_FILLING
https://www.mql5.com/en/docs/constants/tradingconstants/orderproperties

As i said earlier where i have to put this  in the settings of "fill or cancel" in fill policy. I cannot change this setup.

You need to set the Filling Type on the trade object once you create it (you can also set it as a constructor parameter);

 

...
m_trade = new CTrade();
m_trade.SetTypeFilling(ORDER_FILLING_IOC); 
...
Reason: