IB's OCA Group Names Reset

Discussion in 'Interactive Brokers' started by J.P., Mar 24, 2009.

  1. J.P.

    J.P.

    The TWS Users' Guide states:

    "OCA group names must be unique to ensure proper handling of OCA orders. Once you use a name, you cannot use it again even after the order executes or is canceled."

    For what period of time does the above statement hold? A day? A week? Until you log out and in again? Etc. In other words, EXACTLY when is it reset, if ever?
     
  2. from my exprnc, the next day.
     
  3. J.P.

    J.P.

    Thank you Option Trader. IB's "imranf" at their Web ticket Customer Service has no clue. All he (or she) could do is parrot back my question stating that the OCA name shouldn't be used again, and has, thus far, declined to research the EXACT reset time (which I presume is automated)---perhaps once a day or during shut down over the weekend---and that's what I need to know. It is indeed unfortunate that this information is not already available in their documentation. I don't want them to change anything; I just need to know what they are doing so that I can program my ATS accordingly.

    Thanks again, Option Trader.
     

  4. In general, I find the best way to deal with an issue like this is to use a date and time stamp as part of the ID. To provide unique IDs to my ATS, I will always go with:

    position_security_account_date_time

    for example, for a long entry in ES, at 11:05 a.m. on 3/24/2009, in account U123456, I will create an order ID:

    LE_ES_U123456_03242009_1105

    This ensures you can never have any two order IDs sharing the same string.

    rt
     
  5. J.P.

    J.P.

    Thanks RoughTrader; an excellent idea. But I would STILL like to know the exact reset time. This should already be available in the documentation or IMMEDIATELY available from Customer Service, and it's not. What's the secret? What's the problem?
     
  6. I'm not sure why it's important...

    Taking my approach a little further in explanation, every time a position has been closed, I set the order ID to "".

    This ensures that if the string variable, orderID, is not "", then the string content of the variable is the ID of the order for the present position, or possible future position if the order type is limit.

    In other words, for my ATS, only 2 possible conditions can exist if orderID is not "":

    1) a limit order is active
    2) an order has been filled to open a position and the marketposition is no longer 0.

    Like I explained, if you include a date and time stamp in the string, then you don't even need to worry when the ID resets itself.

    rt
     
  7. J.P.

    J.P.

    For the record, I don't know if this is contract-dependent but through testing I found that the OCA Group name for ES resets daily between 5 and 5:30 p.m. Eastern. But obviously RoughTrader's method is preferred. Thanks.
     
  8. i re-used the same OCA name successfully many times the following day. my trades were regular hours only, stocks only.