One-Cancels-the-Other OrderOCO
A one-cancels-the-other (OCO) order links two orders so that when one executes, the other is cancelled. The classic use is a stop-loss and a take-profit on the same position.
An OCO order links two orders so that when one fills, the other is cancelled. Traders use it to set a profit target and a stop-loss at the same time, so the position closes one way or the other without a leftover order. Availability and exact behaviour differ by broker and venue.
- Category
- Order Types
- Reading time
- 3 min
- Also called
- One-cancels-other order, OCO bracket
- Updated
OCO in plain words
A one-cancels-the-other (OCO) order links two orders: as soon as one fills, the other is cancelled.1
Think of it as a pair where execution of either one automatically kills its partner.2
Typically it pairs a stop with a limit order to manage risk on both sides.2
How to set up an OCO
Open the position
Buy or sell first, or attach the OCO to the entry.
Pick a target
Set a limit order at your profit level.
Pick a stop
Set a stop order at your exit level.
Link them
Link the two orders as an OCO so filling one cancels the other.1
Let one trigger
Let the platform handle it: once one leg executes, the other is cancelled automatically.2
Check the result
Check that the second order really is gone, so a leftover stop can't open an unwanted short.1
Worked examples
Example 1 — Target hit
+600.00Hypothetical long at 40.00; OCO with target 46.00 and stop 37.00 on 100 shares.
| Target fills | (46 − 40) × 100 = 600.00 |
The target filled, so the linked stop at 37.00 was cancelled automatically.2
Example 2 — Stop hit
−300.00Same trade, but the price falls to 37.00.
| Stop fills | (37 − 40) × 100 = −300.00 |
Pairing a stop with a limit order covered both the downside and the target.2
Example 3 — Unlinked orders
Risk avoidedA hypothetical trader places a separate target and stop without linking them; the target fills.
| Leftover stop | Still live |
Linking the orders prevents a stray stop from accidentally opening a short position.1
OCO vs separate orders
| Aspect | OCO | Two separate orders |
|---|---|---|
| Link | Linked | Independent |
| After one fills | Other cancels | Other stays live |
| Overfill risk | Low | Higher |
| Setup | One ticket | Two tickets |
Where OCO orders help
Exits
Pair a Take Profit and a Stop Loss.
Management
Hands-off Trade Management.
Breakouts
Orders on both sides of a Range.
Duration
Match the Time-in-Force: IOC, FOK and GTC on both legs.
Advantages and disadvantages
Advantages
- Sets stop and target in one step.
- Prevents a leftover order.
- Removes the need to watch the screen.
Disadvantages
- Not every broker or market offers it.
- Gaps can fill the stop at a worse price.
- Partial fills can complicate the link.
- Both legs need matching time-in-force.
Going deeper
Read as far as you need. Each level builds on the one before it.
Definition
Beginner
Two orders, one outcome: the first to fill cancels the other.1
Risk control
Intermediate
The usual pairing is a protective stop with a profit-taking limit order.2
Why the link matters
Advanced
Without the link, a stop left behind after the target fills could trigger and open a brand-new trade.1
Common mistakes
Different time-in-force
Use the same on both legs.
Stop too tight
Allow for normal noise.
Assuming it works in gaps
Stops can slip.
Not checking partial fills
Confirm the remaining size.
Check your understanding
Test yourself before moving on. Each answer comes with an explanation.
Key points to remember
- OCO links two orders.
- When one fills, the other cancels.
- Classic use: target plus stop.
- Prevents stray orders.
- Availability differs by broker.
Frequently asked questions
Is OCO the same as a bracket?
Do crypto exchanges offer OCO?
Can both legs fill?
Further learning
- Stop Loss
The protective leg.
- Take Profit
The target leg.
- Time-in-Force: IOC, FOK and GTC
Order duration.
- Risk-to-Reward Ratio
Placing both legs.
Sources
This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.
- Charles Schwab. How to Use Advanced Stock Order Types (opens in a new tab) Checked .
- Interactive Brokers. One Cancels Other (IBKR Glossary) (opens in a new tab) Checked .
Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.