Black Friday50% off11d 16:34:10
Execution

OCO Order

Quick definition

OCO Order: An OCO (one-cancels-the-other) order is a pair of linked orders where a fill on one automatically cancels the other. Traders use it to hold a stop-loss and a take-profit on the same position at once, or to place a breakout entry above and below a range so only one side can open a trade.

Also known asone-cancels-the-other orderone cancels otherOCOOCA orderone-cancels-all order

An OCO order (one-cancels-the-other) is two orders tied together with one rule: when either one fills, the other is cancelled. You get two possible outcomes working in the market at the same time, and the guarantee that only one of them happens.

The pair can be anything your broker allows, but two setups cover most real use. The first is an exit pair on a position you already hold, a stop-loss below and a take-profit above. The second is an entry pair around a range, a buy stop above it and a sell stop below it, so whichever way price breaks, you are in on that side only.

How an OCO Order Works

Saxo describes it plainly: "An OCO order really consists of two orders. If either of the orders is executed because its market conditions have been met, the related order is automatically cancelled" (Saxo, One cancels the other).

Interactive Brokers generalizes the idea to a group of any size, which it calls One-Cancels-All (OCA). "The aim is to complete just one of the orders, which in turn will cause TWS to cancel the remaining orders." It adds that "completion of one piece of the group order causes cancellation of the remaining group orders while partial completion causes the group to rebalance" (IBKR, OCA Orders).

In practice the two legs are usually different order types:

  • A limit order on the side where you want a better price, such as a profit target above a long position.
  • A stop order on the side where you want out (or in) once price moves through a level, such as a protective stop below a long, or a breakout entry above a range.

Both orders rest at the same time. Neither one knows anything about the market except its own price. The link between them is handled by the broker's system or, on some venues, by the exchange.

OCO Exits: Stop and Target on One Position

Say you bought 200 shares at $50.00 and want a stop at $47.00 and a target at $56.00. If you place those as two separate orders, nothing stops both from staying alive. Price could hit $56.00, sell your shares, and then fall to $47.00 a week later, where the forgotten stop would sell 200 shares you no longer own and leave you short.

As an OCO, the target filling at $56.00 cancels the stop on the spot. A stop fill at $47.00 cancels the target. One exit, then flat.

ItemValue
Position200 shares long at $50.00
Stop legSell stop at $47.00
Target legSell limit at $56.00
Planned risk (1R)$3.00 × 200 = $600
Planned reward$6.00 × 200 = $1,200, or 2R

This is exactly the exit half of a bracket order. The difference is timing. A bracket sends the entry and the OCO exits together and activates the exits on the fill. A standalone OCO is what you place when you are already in the trade, for example after a manual entry, or after a fill that came in without exits attached.

OCO Entries: Trading a Break Either Way

An OCO breakout pair on a stock ranging between $48 and $52, with a buy stop at $52.10 and a sell stop at $47.90. When price breaks up first the buy stop fills and the sell stop is cancelled, and when it breaks down first the sell stop fills and the buy stop is cancelled

The other common use is an entry pair. A stock has spent two weeks between $48 and $52, and you have no view on direction, only a plan to trade whichever break comes first. You place a buy stop at $52.10 and a sell stop at $47.90 as an OCO.

If price breaks up and the buy stop fills, the sell stop is cancelled and you are long. If it breaks down and the sell stop fills, the buy stop is cancelled and you are short. Without the link, a fake breakout up followed by a real one down could fill both orders and leave you flat after two losing entries, or with two positions you never meant to hold together.

An OCO entry opens the trade but does not protect it. Once one side fills you need a stop on the new position, so many traders use a bracket for each leg instead, or add the stop by hand the moment the entry fills.

Partial Fills and Quantity

Partial fills are where OCO rules differ most between brokers. If your 200-share target fills 80 shares and then price turns, one platform may cancel the stop entirely as soon as the first shares fill. Another may reduce the stop to 120 shares to match what you still hold. IBKR offers both behaviors for OCA groups, plus an option to route only one order at a time to rule out an overfill.

The safe assumption is that you need to know which rule your broker uses before you rely on it. A stop that was cancelled by a partial target fill leaves the rest of the position with no protection at all.

Key Takeaways

  • An OCO order links two orders so a fill on one cancels the other.
  • The most common pair is a stop-loss and a take-profit on a position you already hold. That is the exit half of a bracket order.
  • An OCO entry pair (buy stop above a range, sell stop below) opens only one side, but it does not place a stop on the new position.
  • The cancel is a message, not a guarantee. In a very fast market both legs can fill.
  • Brokers handle partial fills differently. Check whether the other leg is cancelled or resized.

Common Mistakes

Placing a stop and a target as two separate orders. If they are not linked, the one that does not fill stays live after you are flat. That orphaned order can open a position you never planned.

Treating an OCO entry as a complete trade. The entry pair says nothing about where you get out. Have the stop ready, or use a bracket on each leg.

Ignoring time in force. If one leg is a day order and the other is good-til-cancelled, the day order expires at the close and the OCO is now just a single order. Set both legs the same way.

Assuming a partial fill keeps you protected. Read your broker's rule for partial fills, and check the stop's quantity after any partial exit.

Setting the entry pair inside the noise. A buy stop and a sell stop only a few cents outside a messy range can trigger on an ordinary wiggle. Place each one beyond the level the pre-trade plan actually treats as a break.

How JournalX Tracks OCO Orders

An OCO is the order-ticket form of a decision you made before the trade: where you are wrong and where you are done. JournalX keeps that decision next to the result. With pre-trade planning you record the stop and the target up front, so the planned 1R and the planned reward are fixed when you decide them, not after. Broker sync or import then brings in the actual fills, and every trade is measured in R against the plan. Across many trades that shows how often your stop leg fills past its price, how often the target is touched but missed, and whether entries from OCO breakout pairs hold up better on the long side or the short side, so you can judge the method from your own results.

Frequently asked questions

What is an OCO order?

An OCO order, short for one-cancels-the-other, is two orders linked together so that when one of them fills, the other is cancelled automatically. The most common use is a stop-loss and a take-profit on an open position, so that whichever exit fills first removes the other.

How does an OCO order work with an example?

You hold 200 shares bought at $50.00. You place an OCO with a sell limit at $56.00 and a sell stop at $47.00. If price reaches $56.00 first, the limit fills and the stop is cancelled. If price falls to $47.00 first, the stop triggers and fills, and the limit is cancelled. Either way you end up flat, not short.

What is the difference between an OCO order and a bracket order?

An OCO is just the two linked orders. A bracket order is an entry order with an OCO pair of exits attached, and the exits only go live once the entry fills. Use a bracket when you are placing a new trade, and an OCO when you already hold the position or want two alternative entries.

Can both sides of an OCO order fill?

It is rare but possible. The cancel is an automated message, and in a very fast market one leg can fill before the cancel of the other reaches the exchange. Interactive Brokers states there is no guarantee that the cancellation will arrive before an order has executed. Check your position after any violent move.

What happens to an OCO order after a partial fill?

It depends on the broker. Some cancel the other leg as soon as any shares fill, and others reduce the other leg by the filled amount so the remaining quantity stays protected. Look up your platform's rule, because a partial fill on the target can leave the stop sized for shares you no longer hold.

SVReviewed by Santhosh V S

Trade with clarity, not guesswork.

Everything you need to review, learn, and grow, in one trading journal.