How to do this in IB TWS?

Discussion in 'Retail Brokers' started by arzoo, May 13, 2003.

  1. arzoo


    Can you put a 'conditional' order in IB TWS for example, you are long a stock at 30.00 and want to place a stop at 25.00 and a take profit at 40.00 so that when the stop or the target is hit the other is cancelled automatically?

    I think it is possible but dont know how to do it. Hope someone can help.

  2. I think you're looking for the OCA (One Cancels All) order. I use them all the time and they're great for my swing trades.

    You need to activate the OCA column first (see the help file). Then when you enter the stop and target order, put an OCA code in that field. For example, I'll enter a stop for IBM and a target and code them both IBM1. Then I transmit both orders. If one gets hit the other cancels (even adjusts for partials).

    You can also update one or the other order later. The only trick I've seen is you need to remember to add the OCA field before you transmit. You can't tie them together after you've trasmitted them.

    Check the help section for OCA. Good luck.
  3. Steve_IB

    Steve_IB Interactive Brokers

    Ambush is correct. You need an OCA order.

    You can also set-up this trade in advance of being long the stock at 30.
    For example you can send in the limit order to buy at 30 and "if done" then send in the OCA order.
    For this order you should first set-up the limit order, and right click on the order and select Create Bracket Order. The rest should be self-explanatory
  4. Tony98


    One negative that I found about OCA orders is:

    If you are long a stock and you want to put out 2 sell orders, IB does not let you do this if the stock is NOT SHORTABLE. The software seems to think that you will go short on one order, even though they are OCA orders.

  5. arzoo


    Am I correct in assuming that the same procedure using OCA will work for mini futures orders?

    Thanks guys for your help.
  6. The OCA orders and such work fine on the S&P E-mini, although some order types are not native to Globex (held at IB I think until conditions hit - check IB's web site for explanation). Nas mini would be the same. I'm not sure about other futures.
  7. Is there an "opposite"?

    Instead of One Cancels All, is there a One Enters All? 1st order - I'd like to set a limit to buy if a stock breaks out. 2nd order - I'd like to set a stop limit on that stock but only if the breakout order is filled.

  8. I believe that is true for limit orders only. I routinely place oca orders with sell stop and moc and have no problem. The one time I did have a problem was when I placed a stop-limit. The scary thing was the order was'nt rejected untill the stop was hit. Luckily I was watching at the time.
    Perhaps Def can clear this up for us.
  9. I use stop-limts with bracket orders to enter my swing trades all the time.

    For example, I want to buy RIG if it breaks above 20.5, with my stop at 18.5. I can enter the entry order as a stop at 20.5 (or stop limit) and attach a auto-stop order at 18.5 before transmitting. You could even use the bracket orders to have an entry, a target above, and a stop below. The target and stop order only activate if filled on the original. I believe they adjust for partial fills. If the stop or target order is filled the other cancels.

    I've had issues trying to attach brackets to stop-limit entries, for some reason IB hasn't setup this combo yet. I'll enter a stop order, attach a bracket order, and then change the original order to a stop-limit. This seems to work fine.

    There was an issue earlier with GTC orders and the stop-limit entry which caused them to hangup after the first day. I believe IB fixed this, but I still reenter my bracket orders (as OCA) on new positions in the evening or the next morning just to be sure.

    Try it out on the demo with real tight stops and targets and get a feel for it.

    Good luck.
  10. #10     May 14, 2003