OCO Order
A pair of orders where filling one automatically cancels the other.
Also called: one cancels other · one-cancels-the-other
Written by Javier Sánchez Ros
In plain language
One-Cancels-the-Other links two orders so only one can ever execute. The classic use is a stop loss and a take profit on the same open position.
Without the link you risk a dangerous outcome: both exits fill, closing your position and then opening a new one in the opposite direction without you noticing.
OCO pairs are also used for breakout entries — a buy stop above a range and a sell stop below it, taking whichever side breaks first.
Worked through
What happens without the cancel half of the pair
- Position
- long 300 shares
- Target fills at $19.40
- position closed, flat
- Stop at $17.60
- still live
- If price later reaches $17.60
- short 300 shares
The target filled, the trade is over, and the account is flat. But the protective stop was a separate sell order and nobody cancelled it, so it is still resting in the market. Price drifts down over the following days, touches $17.60, and the order does what sell orders do — except there is nothing left to sell, so it opens a short.
The trader now holds a position in the opposite direction to their original view, on an instrument they stopped following, with no stop attached to it. Usually they find out from the statement.
One-cancels-other exists precisely to make this impossible. The two exits are linked: whichever fills first kills the other automatically, so the pair cannot outlive the position it was protecting.
It is the small piece of plumbing that makes unattended trading safe, and it is why brackets are built on top of it rather than on two independent orders.
Why it matters
It is the mechanism that lets you leave a trade unattended without risking an accidental reversed position.
Common mistakes
- Placing separate stop and target orders that are not actually linked.
- Forgetting an OCO breakout pair is still live long after the setup has expired.
Keep exploring
These concepts are connected. Understanding one usually makes the next one easier.
An entry order submitted together with its stop loss and take profit.
A predefined exit that closes a losing trade before the loss becomes serious.
A predefined price where a winning trade is closed automatically.
When price moves decisively beyond an established support or resistance level.
The instruction that says how long an order stays active before it expires.