Order issue : log is difficult to understand

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
Guillaume
Posts: 21
Joined: Mon Sep 04, 2017 5:40 pm

Order issue : log is difficult to understand

Post by Guillaume » Thu Feb 01, 2018 1:44 am

Hi,
I had some issues with MTIBBridge in last days.
This is the part of the continuous log I read, split in parts : (sorry for the long description, but I thinks some explanations by parts could be interesting)
  • important number of lines like these ones :
    20180129 01:08:10:316 API disconnected
    20180129 01:08:13:803 API connected
And then the EA try to place order, and please take care of the time frame, the order seems cancelled very quickly on IB part (I already had this issue some days ago, with 2 orders placed on IB but immediately cancelled). Weird negative ticket number !
  • order placed then cancelled in milliseconds
    20180129 09:59:59:154 [NEW command detected] type=deal add ticket=-2087802739 positionid=-2087802739 symbol=euraud action=BUY ordertype=MKT lots=1.00 price=1.5262900
    20180129 09:59:59:176 [QUEUE FOR PROCESSING -2087802739] mt5_open_position SELL MKT 0 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=0 statu
    20180129 09:59:59:180 [PROCESSING ORDER START] mt5_open_position SELL MKT 0 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=0 status=Initial
    20180129 09:59:59:184 [PROCESSING ORDER] mt5_open_position SELL MKT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=0 status=Initial p
    20180129 09:59:59:236 [OUT] target BUY LMT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_t lmt=1.5207500 aux=0.0000000 uid=1124 status=Order in Transit pos-id=-20
    20180129 09:59:59:489 [IN] stop BUY STP 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_s lmt=0.0000000 aux=1.5293500 uid=1123 status=PreSubmitted pos-id=-2087802
    20180129 09:59:59:520 [IN] target BUY LMT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_t lmt=1.5207500 aux=0.0000000 uid=1124 status=PreSubmitted pos-id=-20878
    20180129 09:59:59:550 [IN] entry SELL MKT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=1122 status=Submitted pos-id=-2087802739
    20180129 09:59:59:622 [IN] entry SELL MKT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=1122 status=Filled pos-id=-2087802739 mt
    20180129 09:59:59:647 [IN] target BUY LMT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_t lmt=1.5207500 aux=0.0000000 uid=1124 status=Submitted pos-id=-20878027
    20180129 10:00:00:795 [DO sync] close EUR.AUD
    20180129 10:00:01:808 API connected
    20180129 10:00:02:317 API disconnected
Then, again the same lines as previously with API connected / API disconnected
Then a lot of lines of this kind
  • 20180129 10:59:57:807 API connected
    20180129 10:59:58:316 API disconnected
    20180129 10:59:59:948; 13672;note;tcBridgeCommServer;treatClientMessage;no instance found
    20180129 10:59:59:949; 13672;note;tcBridgeCommServer;treatClientMessage;no instance found
    20180129 11:00:01:805 API connected
    20180129 11:00:02:314 API disconnected
    20180129 11:00:05:805 API connected
Now, I think the EA try to close the position. The EA doesn't know the position was previously cut in IB at the beginning. Why the information was not synced from IB to MT5 ?
  • 20180129 11:18:02:313 API disconnected
    20180129 11:18:07:139 [NEW command detected] type=position ticket=0 positionid=-2087802739 symbol=euraud action=BUY ordertype=MKT lots=1.00 price=1.5262900
    20180129 11:18:07:157 [QUEUE FOR PROCESSING 0] mt5_modify_bracket BUY MKT 0 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=0 stat
    20180129 11:18:07:160 [PROCESSING ORDER START] mt5_modify_bracket BUY MKT 0 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=0 stat
    20180129 11:18:07:165 [PROCESSING ORDER] mt5_modify_bracket BUY MKT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739 lmt=0.0000000 aux=0.0000000 uid=0 statu
    20180129 11:18:07:170; 4336;warning;mtib_metatrader;processMT5Order;no IB positions to amend bracket
    20180129 11:18:07:653 [NEW command detected] type=deal add ticket=-2087800196 positionid=-2087802739 symbol=euraud action=BUY ordertype=MKT lots=1.00
    20180129 11:18:07:663 [IGNORED ticket - ticket closes or lowers unknown position] type=deal add ticket=-2087800196 positionid=-2087802739 symbol=eurau
    20180129 11:18:09:804 API connected
    20180129 11:18:10:312 API disconnected
    20180129 11:18:10:325 [IN] stop BUY STP 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_s lmt=0.0000000 aux=1.5293500 uid=1123 status=Submitted po
    20180129 11:18:10:351 [IN] target BUY LMT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_t lmt=1.5207500 aux=0.0000000 uid=1124 status=PendingCan
    20180129 11:18:10:407 [IN] stop BUY STP 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_s lmt=0.0000000 aux=1.5293500 uid=1123 status=Filled pos-i
    20180129 11:18:10:421 [IN] target BUY LMT 100000 mt=EURAUD ib=EUR.AUD ticket=-2087802739_t lmt=1.5207500 aux=0.0000000 uid=1124 status=Cancelled
    20180129 11:18:10:428; 13672;note;tcBridgeCommServer;treatClientMessage;no instance found
    20180129 11:18:12:678 [DO sync] close EUR.AUD
    20180129 11:18:13:807 API connected
    20180129 11:18:14:315 API disconnected
    20180129 11:18:17:807 API connected
    20180129 11:18:18:315 API disconnected
And again same lines about connection issues ....

Can you provide some explanations about what kind of things happened ?

I would have liked to joined the part of the log, but I don't know how to do that, because the "Add files" button always return "Invalid file extension" error.

Thanks
Regards

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

Re: Order issue : log is difficult to understand

Post by board_admin » Thu Feb 08, 2018 11:28 am

I did not read the whole log. But the quick cancellation was a bug in a prior version.
From another post i know you are not using latest version.

Please update and check if the problem still exists.

Just one hint: The bridge never "syncs" back to MetaTrader. It is read only.
Also, never run an ib_order_sync and a tcEAScanOrder at the same time.

The tcEAScanOrder can used in multiple MetaTrader instances, but the ib_order_sync makes
only sense when used in one and only one MetaTrader exclusively.

Post Reply