Topic: Error: Invalid order filling type
Hello ,
I keep having this error when backtesting an EA produced on FSB (3.8.8) with MT5 and whatever is the EA used...
The EAs work well on MT4.
is there a way to fix that for MT5??
Thanks
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Help and Support → Error: Invalid order filling type
Hello ,
I keep having this error when backtesting an EA produced on FSB (3.8.8) with MT5 and whatever is the EA used...
The EAs work well on MT4.
is there a way to fix that for MT5??
Thanks
Posting the full error message :
Error: ActionTrade::ManageOrderSend(): OrderCheck(): Invalid order filling type
Again it's only happeny when testin an EA with mt5 ..
Any help would be appreciated !
Thanks
MT5 send a param called Order Filling Type to the server when sending orders. The weird part hers is that every broker has only one filling type, which must be possible to set this param internally, but not. The other quirk is that the method of checking the exact filling type doesn't work in MT.
The EA Studio experts tries to detect the correct method, but the different brokers return different errors and we cannot make an universal solution.
A workaround is to set the filling type manually.
Find the GetOrderFillingType function at the end of the expert.
Change it from:
ENUM_ORDER_TYPE_FILLING GetOrderFillingType()
{
const int oftIndex=(int) SymbolInfoInteger(_Symbol,SYMBOL_FILLING_MODE);
const ENUM_ORDER_TYPE_FILLING fillType=(ENUM_ORDER_TYPE_FILLING)(oftIndex>0 ? oftIndex-1 : oftIndex);
return (fillType);
}
to:
ENUM_ORDER_TYPE_FILLING GetOrderFillingType()
{
return (ORDER_FILLING_IOC);
}
If it doesn't work, try with: ORDER_FILLING_FOK or ORDER_FILLING_RETURN
Thanks for your support , much appreciated !
That works now.
Please tell us what is your broker and what was the proper Order fill settings.
My broker is Activtrade and correct order fill setting used and working is ORDER_FILLING_IOC..
Thanks
I'll try to make it fixing the filing type automatically. Other option would be to show a message: "Please call MetaQuotes to fix their order filling type". It is possible after receiving 458832636495943 calls to consider to fix the problem within the next few years.
Is there any update to the subject "Error: Invalid order filling type " ?
I am trying the FSB demo and I am very impressed by the speed of it and its wonderful interface, but since I always have this error on any generated EA and since I intend to use the generated EAs for forward testing on MT5, I will not buy a license unless this problem is solved. FSB version 4 is useless for me if I can not test and trade the generated EAs on MT5.
With version 4.0.0 of FSB, the GetOrderFillingType() function is (notice ActionTrade) :
ENUM_ORDER_TYPE_FILLING ActionTrade::GetOrderFillingType()
{
const int oftIndex=(int) SymbolInfoInteger(_Symbol,SYMBOL_FILLING_MODE);
const ENUM_ORDER_TYPE_FILLING fillType=(ENUM_ORDER_TYPE_FILLING)(oftIndex>0 ? oftIndex-1 : oftIndex);
return (fillType);
}
See attached EA file if needed. This EA seems very simple with standard MT5 indicators.
Thank you for your help.
It should work automatically.
The expert sends an order with a default Order filling Type. If the broker returns an error, the expert changes the option until it finds the correct one.
What is your broker?
Please check on its website what order filling type it uses.
Thank you for your very quick reply.
The journal log shows this error dozens of time and no trade is opened in the tester.
My broker is : https://the5ers.com/
it doesn't work on AMPGlobal
Hello, I am trying to let the Robot run on a 10k FTMO challenge, Lot size o.1, max position 0.1.
I am facing the same issue on MT5, has been reported by Popov to modify:
ENUM_ORDER_TYPE_FILLING GetOrderFillingType()
{
const int oftIndex=(int) SymbolInfoInteger(_Symbol,SYMBOL_FILLING_MODE);
const ENUM_ORDER_TYPE_FILLING fillType=(ENUM_ORDER_TYPE_FILLING)(oftIndex>0 ? oftIndex-1 : oftIndex);
return (fillType);
}
unfortunately i have on my Robot:
ENUM_ORDER_TYPE_FILLING ActionTrade::GetOrderFillingType()
{
const int oftIndex=(int) SymbolInfoInteger(_Symbol,SYMBOL_FILLING_MODE);
const ENUM_ORDER_TYPE_FILLING fillType=(ENUM_ORDER_TYPE_FILLING)(oftIndex>0 ? oftIndex-1 : oftIndex);
return (fillType);
}
which is different.
ENUM_ORDER_TYPE_FILLING GetOrderFillingType()
ENUM_ORDER_TYPE_FILLING ActionTrade::GetOrderFillingType()
Does anyone has been able to solve the problem? Can someone help me please? As per today i ve purchased a Robot that is not running on my platform
Thank you so much
ENUM_ORDER_TYPE_FILLING ActionTrade::GetOrderFillingType()
{
return (ORDER_FILLING_IOC);
}
solved.
Hello Sanapinta,
I'm glad you solve the problem.
Unfortunately, you have to make this change in any expert you export from FSB Pro for your broker.
I'll see how I can make a permanent solution in the FSB Pro's MQL code.
Please find the function: ActionTrade::GetOrderFillingType()
Replace it with:
ENUM_ORDER_TYPE_FILLING ActionTrade::GetOrderFillingType()
{
return ((ENUM_ORDER_TYPE_FILLING)OrderGetInteger(ORDER_TYPE_FILLING));
}
If it works,
I'll make it permanent in the FSB Pro and EA Studio's MQL code.
I updated the MQL code of FSB Pro with this fix.
Please test it in MT5 and report if it works fine for you.
Trade Safe!
Forex Software → Help and Support → Error: Invalid order filling type
Powered by PunBB, supported by Informer Technologies, Inc.