Page 1 of 1

Market orders in TWS when Limit order filled in MT4

Posted: Wed Sep 23, 2020 5:49 pm
by AndyN
Can MT-IB copier handle submitting a Market order in TWS whenever a limit order is filled in MT4? As it is now, a limit order might be filled in MT4 but left unfilled in TWS which can be dangerous.

If the above is not possible, can at least the orders in TWS be submitted with 1/10 of a pip accuracy instead of the current 0.5 pip?

Re: Market orders in TWS when Limit order filled in MT4

Posted: Wed Sep 23, 2020 6:51 pm
by board_admin
You could disable limit orders when attaching ib_order_copy.

Code: Select all

Copy only MKT orders=true
This makes a limit order is ignored. But when this limit order gets
filled, a MKT order is placed at IB.

----
I believe, that a limit fill at MT in any case forces a MKT at TWS. (Turns LMT into MKT).

To test this, do the following:
Place a limit order in MT. Move it close to current market but not too close.
Go to TWS and move limit order away from market.

Wait until filled at MT.

----

You can overwrite the mintick of the contract.
On contract page, double click on contract. Change mintick
in the lower left. Click "Ok".
But it makes no sense, when IB is not allowing this mintick.

Re: Market orders in TWS when Limit order filled in MT4

Posted: Fri Sep 25, 2020 8:20 am
by AndyN
No, a filled LMT in MT4 does not force a MKT in TWS. But the solution you suggested would work

Re: Market orders in TWS when Limit order filled in MT4

Posted: Fri Sep 25, 2020 8:30 am
by AndyN
I encountered a problem: submitted a Market order in MT4 with an EA attaching SL and TP to it.
The order was executed as MKT in TWS but only STP order was submitted. The LMT order (equivalent to TP in MT4) was "Rejected by System: The parent order is being canceled".

How to prevent that type of action?

Re: Market orders in TWS when Limit order filled in MT4

Posted: Fri Sep 25, 2020 8:33 am
by AndyN
Also, any chance that orders could be submitted in 1/10th of a pip?

Re: Market orders in TWS when Limit order filled in MT4

Posted: Mon Jan 02, 2023 5:21 pm
by josef.prasek
Can you describe in more detail where exactly to set "Copy only MKT orders=true". I can't find it anywhere in MTIB. Thank you.

Re: Market orders in TWS when Limit order filled in MT4

Posted: Mon Jan 02, 2023 6:44 pm
by board_admin
You do this when you apply the expert ib_order_copy to the chart.
It is one of the top parameters.

However, when you apply Stoploss and/or TakeProfit to your MetaTrader order, these would still place stop- and limit
orders.

To avoid this in addition, you need to disable Stoploss and Takeprofit.
To do this, get in copier menu/Setup/Misc.. settings

Set "Ignore Takeprofit and Stoploss" to "yes".

When a stoploss/takeprofit is triggered on MetaTrader side, the copier receives a "close" message
and places a close order which has opposite action and is of type MKT.