forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Help and Support → Error: Invalid order filling type

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 7

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

Re: Error: Invalid order filling type

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

Re: Error: Invalid order filling type

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

Re: Error: Invalid order filling type

Thanks for your support , much appreciated !

That works now.

Re: Error: Invalid order filling type

Please tell us what is your broker and what was the proper Order fill settings.

Re: Error: Invalid order filling type

My broker is Activtrade and correct order fill setting used and working is ORDER_FILLING_IOC..

Thanks

Re: Error: Invalid order filling type

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.

Posts: 7

Pages 1

You must login or register to post a reply

Forex Forum → Help and Support → Error: Invalid order filling type

Similar topics in this forum