Back to Blog

OCO Orders: One Cancels Other Explained

OCO orders are a fundamental tool for managing trades with multiple possible outcomes. When you need both a profit target and a stop loss active simultaneously, OCO orders ensure only one executes while automatically canceling the other. This prevents the dangerous situation of having both orders fill and doubling your position or creating an unwanted opposite position.

What is an OCO Order?

OCO stands for One Cancels Other. It links two separate orders together so that when one order executes, the other is automatically canceled. This linkage is essential when you have two exit orders for the same position and only want one to fill.

Think of it as a light switch: Two switches control the same light, but only one can be on at a time. When you flip one on, the other automatically turns off. OCO orders work the same way with your trades.

How OCO Orders Work

Here is the typical OCO order sequence:

Basic OCO Order Example

You own 100 shares of Amazon (AMZN) at $185. You want to take profit at $200 or cut losses at $175.

If AMZN rises to $200, Order 1 fills and you pocket $1,500 profit. Order 2 automatically cancels. If AMZN drops to $175 first, Order 2 fills limiting your loss to $1,000, and Order 1 cancels. Either way, you only sell once.

Why OCO Orders Are Essential

1. Prevent Double Execution

Without OCO linking, both orders remain active after one fills. If price reverses after hitting your stop, your profit target could fill too, putting you into an unwanted position. OCO prevents this entirely.

2. Manage Exits While Away

You cannot always watch the market. OCO orders let you set your exits and walk away, knowing that whichever scenario plays out, you will exit appropriately with the other order canceled.

3. Enforce Trading Discipline

With both exits set as OCO, you are committed to your plan. No second-guessing, no moving targets, no hoping. The market decides which exit triggers, and you accept the result.

4. Reduce Order Management

Without OCO, you would need to manually cancel one order when the other fills. This requires constant monitoring and quick action. OCO automates this entirely.

Common OCO Order Setups

Profit Target and Stop Loss

The most common use. A limit order to take profit sits above your entry while a stop order to cut losses sits below. This is the exit structure used in bracket orders.

Profit/Stop OCO Setup

You bought Microsoft (MSFT) at $420.

Both orders stay active until price reaches one level or the other.

Breakout or Breakdown Entry

OCO can also be used for entries when you are unsure which direction a stock will break. Set a buy stop above resistance and a sell stop below support. Whichever triggers first gets you into the trade in that direction.

Breakout Entry OCO

Tesla (TSLA) is consolidating between $240 and $260.

You do not know which way TSLA will break. If it breaks up through $260, your buy order fills and the short order cancels. If it breaks down through $240, your short order fills and the buy order cancels.

Two Profit Targets

For traders who want to sell at one of two levels depending on market conditions. Less common but useful in certain strategies.

OCO Order Types Combinations

OCO orders can combine different order types:

Limit + Stop

Most common for exits. Limit order for profit, stop order for loss protection. The limit waits for price to rise to your target while the stop triggers if price falls to your cut point.

Stop + Stop

Used for breakout entries. Both orders are stops that trigger on price movement. One triggers on upward movement, one on downward.

Limit + Limit

Used for range-bound trading. Buy limit at support, sell limit at resistance. Whichever level price reaches first gets filled.

Stop Limit + Stop

Profit target as a stop limit for more price control, paired with a standard stop for loss protection. Gives you better fills on the profit side while ensuring the stop executes.

OCO vs Bracket Orders

Bracket orders include OCO functionality but add an entry order. A bracket order is essentially an entry order plus an OCO exit pair. If you already have a position, you only need the OCO exit orders. If you are entering a new position, a bracket order gives you entry plus OCO exits in one package.

Common OCO Mistakes

1. Unlinked Orders

Placing two separate orders without OCO linking. This is dangerous because both can fill. Always verify your orders are properly linked as OCO.

2. Wrong Quantities

If your OCO orders have different quantities, you could end up with a partial position. Ensure both orders are for the same number of shares.

3. Same Side Orders

Both OCO orders should exit your position. Do not accidentally set both as buys or both as sells when you need one of each.

4. Price Gaps

If price gaps past both your levels overnight, behavior depends on your broker. The stop typically fills at the gap price while the limit remains unfilled. Understand how your broker handles gap scenarios.

5. Forgetting to Set OCO

After a position opens, traders sometimes forget to place their OCO exits. Make it a habit to immediately set your OCO orders after entry confirmation.

OCO Order Availability

Most major brokers support OCO orders, though the interface and terminology varies:

Advanced OCO Strategies

Scaled Exit OCO

Instead of one profit target, use multiple OCO groups to scale out. Sell half at one target with a corresponding stop, then sell the rest at a higher target with an adjusted stop.

Time-Based OCO Adjustment

If a trade is not working after a certain time, tighten your OCO levels to exit faster. This frees capital for better opportunities.

Volatility-Adjusted OCO

Widen or narrow your OCO spread based on current volatility. High VIX environments might need wider spreads, while low volatility allows tighter targets.

Analyze Your OCO Trade Results

Pro Trader Dashboard tracks how often your profit targets hit versus your stops. See your win rate and average profit to optimize your OCO placements.

Try Free Demo

Summary

OCO orders are essential for managing trades with multiple exit scenarios. By linking your profit target and stop loss, you ensure only one executes while the other automatically cancels. This prevents double fills, enables hands-off trade management, and enforces discipline in your trading.

Every position you hold should have OCO exits in place. Define your target, define your stop, link them as OCO, and let the market determine your exit. This systematic approach is fundamental to consistent trading success.

Learn more about related order types in our guides on bracket orders and OTO orders.