Jump to content
Medved Trader Forums

Specify Trade Identification?


Jason

Recommended Posts

In my trading setup I use a third party software tool to place and manage my trades in conjunction with MT through IB. It's important that I be able to track performance on a trade level (matching the transactions that liquidate the position to the corresponding transactions that initiated that position). The problem is that when I send an order to exit a position IB has no way of knowing that the order to sell or cover is associated with a particular entry. Simulaneously, while my software is able to perfectly associate every exit with every entry as a complete and separate trade it has no way of matching up the orders transmitted to IB with the Order ID numbers IB assigns to the transactions that fill those orders as you would see on the trade log.

So my question is, is there any way through the API or any other way that I can attach a specific order or trade ID to the orders sent to IB? The identification would then allow me to group all associated transactions/fills together as individual trades. I am working exclusively with market orders.

Link to comment
Share on other sites

Thanks! Incidentally, I stumbled upon a few things here that renewed my interest in having the ability to do this...

https://www.ibkrguides.com/reportingreference/reportguide/trade confirmation configuration.htm

Interactive Brokers allows the user to manually specify an "Order Reference" number. I've been able to confirm that this can be done for market orders on the TWS trade ticket and this identifier can be selected for retrieval when running customized reports. If I could specify an identifier and group together multiple transactions as trades then I could do all kinds of in-depth performance analysis. Sites like TradeInsights can assist with some basic performance metrics but methods vary and the cookie-cutter approach they offer isn't sufficient for my purposes. Plus they can choke when attempting to properly match buys and sells from complex positions imported from trade logs.

 

Link to comment
Share on other sites

  • 1 month later...

Thanks for adding this!

Just wanted to post a follow-up regarding this in case anyone else wants to implement it... The idea behind being able to specify an OrderRef indentifier was to provide me with an easy way to identify all transactions associated with a trade through the API and to also have this reflected in trade confirmations/flex query reports on IB's end. I can report that this functionality does not work properly. After some testing I discovered that this is a problem with IB. Specifying the OrderRef through the API works great and that same OrderRef value is properly returned in transaction updates but when running reports on the IB site the OrderRef value is not provided. I had no reason to expect their reports to be borked like this but I've confirmed with IB that it's an issue that their system is actually set up by default to not display the OrderRef values in reports (for some heretofore undiscoverable reason). The feedback I received is that they have received a number of requests about it and are (considering) working to fix it. Not holding my breath but at least having the option to use it in the API effectively offers us the same benefit.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...