Skip to main content
Order types

One-Cancels-the-Other (OCO) Orders

Pomegra Learn

One-Cancels-the-Other (OCO) Orders

An OCO order is a grouping of multiple orders linked by a single rule: when any one of them executes, all the others automatically cancel. This deceptively simple structure enables traders to set up complex conditional scenarios—waiting for one of several possible price levels to be hit, then entering or exiting trades based on which one triggers first. Unlike bracket orders, which have a rigid three-part structure, OCO orders are flexible and can involve any number of component orders, making them one of the most adaptable tools in a trader's toolkit.

Quick definition: An OCO (One-Cancels-the-Other) order links two or more orders such that when one executes, the remaining orders automatically cancel. This allows traders to play multiple scenarios with a single order setup.

Key takeaways

  • OCO orders link multiple independent orders—when one fills, the others cancel immediately
  • Unlike bracket orders, OCO orders have no required structure; any combination of orders can be linked
  • Most commonly used for either/or entry scenarios or contingent exit management
  • Can include market orders, limit orders, stop orders, or any combination thereof
  • Reduces manual order management and emotional decision-making in multi-scenario setups
  • Particularly powerful for swing traders waiting for technical confirmation at multiple price levels

The Fundamental Difference from Other Order Types

Standard orders like market and limit orders execute independently without awareness of other orders you may have placed. If you place a limit buy order at $50 and separately place a limit buy order at $48, both could execute if the price touches both levels (filling both, potentially doubling your position unintentionally).

A bracket order, by contrast, enforces a rigid three-layer structure: one entry with two predetermined exits. This structure is optimal for single entries with pre-planned profit and loss targets.

An OCO order provides the flexibility between these extremes. You can group any number of orders together with the rule that executing one cancels all others. This works in any direction: multiple potential entries, multiple exits, or combinations of both.

Example of OCO Flexibility: You expect a stock to either break above resistance at $100 or hold support at $90, and you want to trade whichever scenario plays out first. Instead of placing two separate buy limit orders and monitoring both (risking double-fills), you place an OCO linking a buy at $100 and a buy at $90. Whichever fills first automatically cancels the other.

How OCO Orders Work: The Mechanics

When you submit an OCO order, the broker or platform registers it as a linked group. The orders remain independent—each can be a different order type with different price targets—but they share the cancellation logic. Here's the sequence:

All Orders Go Active Simultaneously once submitted. They don't execute in a queue; all are waiting for their trigger conditions at the same time.

Any Order Can Execute First depending on market movement. If you linked a buy at $100 and a buy at $95, and the price moves to $98 then jumps to $101, the $100 order executes. The $95 order immediately cancels because the cancellation rule is already triggered.

Execution Triggers Automatic Cancellation of the remaining linked orders. The cancellation happens instantly on the broker's side; you don't need to do anything.

You Receive Confirmation of the execution and cancellation through your trading platform's notifications.

This flexibility is what makes OCO orders powerful for multi-scenario trading. You're not forced into a specific entry structure or confined to predetermined profit/loss levels. You build the scenarios you expect to encounter.

Types of OCO Configurations

Two-Entry OCO: The most common setup where you anticipate a breakout in two possible directions. You place a buy limit above resistance and a sell short above resistance simultaneously. If the market breaks up, the long entry executes and the short entry cancels. If it breaks down, the opposite happens.

Example: Stock at $50 with resistance at $52 and support at $48. You place a long limit at $52 and a short limit at $48. One will execute when the stock decisively moves in one direction.

Two-Exit OCO: You're holding a position and want to exit using two different methods. Maybe you link a profit-taking limit order with a trailing stop order. Whichever triggers first (profit target or stop hit) exits your position, and the other cancels.

Example: You're long 100 shares of XYZ at an average of $45. You link a sell limit at $50 (profit target) with a stop-loss at $42. If it rallies to $50, you exit profitably. If it falls to $42, you exit with a loss. Either way, one order executes and the other cancels.

Three-or-More-Order OCO: Some platforms allow grouping more than two orders. You might link buy limits at three different support levels, exiting with whichever level holds and provides entry first.

Example: A stock is declining through multiple support zones. You place buy limit orders at $40, $35, and $30, linking them as an OCO. The first level to hold and generate an upturn executes; the others cancel.

Entry-and-Exit OCO Combinations: A more complex setup where you link an entry order with multiple exit options. If the entry doesn't fill but you still want to be in the trade, you could use an OCO entry scenario (buy at level A or buy at level B), and then manually adjust exits once you're in.

Real-world Examples

Breakout Trading Scenario: A trader is analyzing a consolidated range-bound stock trading between $45 and $55. Technical analysis suggests a breakout is imminent but the direction is unclear. She places an OCO with two orders: (1) buy 100 shares at $56 (above resistance) if it breaks up, and (2) sell short 100 shares at $44 (below support) if it breaks down. The next day, the stock gaps down to $43, executing the short entry. The long buy-at-$56 order automatically cancels. The trader is now short, with position risk defined by whichever level she predefined for her exit.

Swing Trade Entry Timing: A swing trader has identified a technical setup in Apple but the ideal entry price is ambiguous. Current price is $182. He believes strong entry confirmation occurs either above $185 (bullish breakout) or a bounce at $177 (bullish reversal). He places an OCO with (1) buy at $185.50 and (2) buy at $176.50, linked so that whichever fills first cancels the other. Within three days, Apple falls to $176.50 and bounces, triggering his reversal entry. The $185.50 order cancels automatically.

Trailing Stop with Profit Target: A trader holds a profitable position in Tesla up 15% from entry. Rather than watch it constantly, she links two exit orders: (1) a trailing stop 8% below current price (to capture remaining upside but protect gains), and (2) a limit order 5% above current price (an aggressive profit-taking level). She sets them as an OCO so that whichever triggers first closes her position and cancels the other.

Multiple Support Level Scalping: A day trader in EURUSD identifies three consecutive support levels at 1.0850, 1.0820, and 1.0790. He's looking to enter long on the first support that holds. Instead of manually placing three orders and monitoring, he links three buy limit orders at all three levels as an OCO. The first bounce off support executes an order; the other two cancel.

Common mistakes

Not Understanding Which Order Executes First in Competitive Scenarios: In fast-moving markets where multiple orders could theoretically execute (e.g., a price movement from $49 to $52 when you have buy orders at $50, $51, and $52), execution order depends on how the exchange routes orders. Assuming a specific execution sequence without confirming with your broker can lead to surprises.

Creating Logically Impossible OCO Scenarios: For example, linking a buy limit at $100 with a buy limit at $102, then expecting one to execute in a flat market. Neither will execute until the price moves above $100, at which point the $100 limit executes first. The $102 order cancels, so it never triggers. Ensure your linked orders make logical sense together.

Forgetting That Partial Fills Don't Trigger Cancellation: If you link a buy for 100 shares at $50 with a buy for 50 shares at $48, and the $50 order partially fills for 75 shares due to available liquidity, the remaining 25 shares of that order are still active. The $48 order might still execute. Some brokers require full execution to trigger the cancellation rule; read your broker's documentation carefully.

Using OCO Orders in Highly Volatile or Gap-Prone Securities: In stocks prone to gap moves (biotech, post-earnings, meme stocks), your OCO setup might be rendered obsolete by an overnight gap. A price that gaps from $48 to $55 skips right over your $50 entry level. Consider using day-order settings and reestablishing OCO setups daily.

Overlapping Multiple Strategies: Placing several OCO orders on the same security without carefully tracking them can create accidental correlations. If you place one OCO for a breakout trade and another for a mean-reversion trade on the same stock, both might have active entry orders. If one executes, you suddenly have a position, but your second OCO's exit orders might still be live, creating confusion.

FAQ

Q: How many orders can I link in an OCO group?

A: It depends on your broker. Most allow 2–5 orders per OCO, with some platforms permitting more. Check your broker's documentation or trade with them to understand limits. Some brokers call groups of more than two "One-Cancels-All" (OCA) or have platform-specific naming.

Q: If I link a market order and a limit order in an OCO, does the market order always execute first?

A: Not necessarily. A market order executes immediately at available prices, yes, but if it doesn't fully execute (partial fill), the remaining balance remains active. A limit order waits for its price. The scenario depends heavily on current market conditions and liquidity. For example, a market buy during a gap-down opening could face a partial fill, while a competing limit buy at a better price never triggers because the market order hasn't fully executed yet.

Q: Can I modify an OCO order after submission?

A: Most brokers allow you to modify the price levels of individual orders within the OCO, but modifying one order may require canceling the entire OCO and resubmitting. Some platforms are more flexible. It's best to confirm your broker's rules before relying on mid-trade modifications.

Q: What if I cancel one order within an OCO—does it cancel the whole group?

A: Typically, canceling one order within an OCO cancels the entire group, since the group loses its meaning. Some advanced platforms might allow canceling individual orders within a group, but this is platform-specific. When in doubt, contact your broker's support team.

Q: Do OCO orders work with after-hours trading?

A: This varies by broker. Most brokers restrict OCO orders to regular trading hours. After-hours trading typically has lower liquidity and simpler order functionality. Some brokers offer extended-hours OCO support; check your platform's settings.

Q: How are OCO orders different from a bracket order?

A: Bracket orders have a rigid structure: one entry with two conditional exits. OCO orders are fully flexible—you link any orders with the same cancellation rule. All bracket orders are technically OCAs (One-Cancels-All), but not all OCAs are bracket orders. A bracket order is optimized for entry-and-exit risk management; OCO is a broader tool for any multi-scenario setup.

Q: If an OCO order partially fills, what happens to the linked orders?

A: This depends on your broker's implementation. Some treat a partial fill as an execution (canceling linked orders), while others only cancel when the full quantity is filled. Always confirm your broker's policy on partial fills before relying on OCO orders.

External resources:

Summary

OCO (One-Cancels-the-Other) orders represent one of the most flexible tools available to modern traders. By linking any number of orders with a simple rule—when one executes, the rest cancel—OCO orders allow traders to set up multi-scenario conditional plays without manual intervention or emotional monitoring. Whether waiting for a breakout in one of two directions, managing multiple exit options for a single position, or entering at the first support level that holds, OCO orders handle the mechanics automatically.

The power of OCO orders lies in their flexibility and their removal of decision burden at critical moments. Instead of watching a stock and manually deciding which of three possible support levels to buy at, you let the market execute your OCO, and the first level to trigger becomes your entry. This is automation not in the sense of artificial intelligence, but in the sense of pre-planned logic executed without emotion or hesitation.

Traders who master OCO orders gain an advantage in multi-scenario setups where they have multiple potential entry points or exits but can't predict which will actually occur. The reduced monitoring burden and consistent execution of pre-planned contingency plans make OCO orders invaluable for anyone trading complex technical setups or managing multiple timeframes simultaneously.

Next

One-Triggers-the-Other (OTO) Orders