Market orders in TWS when Limit order filled in MT4

Discuss, post questions here about MTIBBridge the MetaTrader-Interactive Brokers trade-copier

Users who just registered, please write an email to
forum@trade-commander.de
with your username mentioned.
So we can distinguish you from bots.
Thank you
Post Reply
AndyN
Posts: 8
Joined: Wed Sep 23, 2020 11:17 am

Market orders in TWS when Limit order filled in MT4

Post 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?

board_admin
Site Admin
Posts: 244
Joined: Mon Apr 24, 2017 3:24 pm

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

Post 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.

AndyN
Posts: 8
Joined: Wed Sep 23, 2020 11:17 am

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

Post by AndyN »

No, a filled LMT in MT4 does not force a MKT in TWS. But the solution you suggested would work

AndyN
Posts: 8
Joined: Wed Sep 23, 2020 11:17 am

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

Post 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?

AndyN
Posts: 8
Joined: Wed Sep 23, 2020 11:17 am

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

Post by AndyN »

Also, any chance that orders could be submitted in 1/10th of a pip?

josef.prasek
Posts: 1
Joined: Mon Jan 02, 2023 4:51 pm

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

Post 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.

board_admin
Site Admin
Posts: 244
Joined: Mon Apr 24, 2017 3:24 pm

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

Post 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.

Post Reply