Can you tag orders by system in TWS API?

Discussion in 'Automated Trading' started by travis, Jun 5, 2011.

  1. travis

    travis

    My automated systems run on excel and send their orders to TWS. I have so many systems that there's an increasing risk to confuse the EUR trades from one system with the EUR trades from another (the same applies to the other symbols).

    I want to keep track of all the trades my systems make on the real account, and I've been using their daily statement on excel, which has these columns:

    Symbol
    Date/Time
    Exchange
    Quantity
    T. Price
    C. Price
    Notional Value
    Comm/Tax
    Basis
    Realized P/L
    MTM P/L
    Code

    The problem is that none of these columns is a field for customized codes. So, has anyone any advice regarding how I could tag an order, at the moment a system sends it (via a vba macro on excel), with the name of that system? Will the daily statement show an extra column or is there no hope of having my code show on it?

    I've checked the "Extended Order Attributes" and they have many columns that might suit my purpose, but none of them is then listed on the daily statement, which is the only way for me to track my orders.

    Any other ideas on how to solve this problem?
     
  2. vikana

    vikana Moderator

    One little trick I've used is to encode the system in the name of the OCA group.

    I would be nice if the API had a string for use by the customer which would get returned as part of the events.
     
  3. travis

    travis

    Thank you. This would be great. But, can you show me where the OCA group shows in the daily statements with the trades? You know, those reports you can download in excel format, from the online account. I don't see a column for the OCA group (the list of columns is in my post above).