OCO Order (One-Cancels-the-Other)

Order Types
intermediate
12 min read
Updated Jun 15, 2024

What Is an OCO Order?

An OCO (One-Cancels-the-Other) order is a sophisticated trade instruction that pairs two conditional orders—typically a limit order and a stop order—such that the execution of one automatically cancels the other.

An OCO (One-Cancels-the-Other) order is a powerful tool for traders who want to automate their exit strategy. Essentially, it links two separate orders together. If the market moves in your favor and hits your profit target (the limit order), the trade is closed for a gain, and the protective stop-loss is immediately canceled. Conversely, if the market moves against you and hits your stop price, the trade is closed for a controlled loss, and the profit target order is canceled. Without an OCO order, a trader would have to manually enter two separate orders: one to sell at a profit and one to sell at a loss. The danger with manual entry is that if one executes, the other remains live in the market. If the price then reverses, the second order could also execute, leaving the trader with an unintended new position (often a short position they didn't want). The OCO automates this "cleanup" process, ensuring you are either flat (out of the market) or holding the position with your original parameters intact. This order type is particularly popular among day traders and swing traders who may not be able to watch their screens every second. It provides a "set it and forget it" mechanism for managing open positions, allowing for disciplined risk management and consistent profit taking.

Key Takeaways

  • An OCO order allows traders to set both a profit target (limit order) and a loss limit (stop order) simultaneously.
  • When one side of the order is filled (executed), the trading platform automatically cancels the remaining order to prevent unintended positions.
  • This order type is essential for automated trade management, freeing traders from the need to constantly monitor the market.
  • It is widely used in volatile markets where prices can move rapidly in either direction.
  • OCO orders help enforce discipline by pre-defining exit points before a trade is entered.

How an OCO Order Works

To understand how an OCO order works, imagine you have bought 100 shares of a stock at $50. You want to lock in profits if it rises to $55, but you also want to limit your losses if it drops to $48. You would enter an OCO order consisting of two parts: 1. Sell Limit Order at $55. 2. Sell Stop Order at $48. These two orders sit on your broker's server (or sometimes the exchange's book) simultaneously. Scenario A: Price Rises The stock rallies to $55. Your Sell Limit Order is triggered and filled. You sell your 100 shares for a $500 profit. The moment this fill occurs, the system automatically sends a cancellation request for your Sell Stop Order at $48. The stop order disappears, and you are left with cash and no open orders. Scenario B: Price Falls The stock drops to $48. Your Sell Stop Order is triggered and becomes a market order, filling at the next available price (say $47.95). You sell your shares for a roughly $200 loss. The system immediately cancels the Sell Limit Order at $55. Scenario C: Neither Hits The stock fluctuates between $49 and $54. Both orders remain active until one is hit or you manually cancel the entire OCO group (e.g., at the end of the trading day).

Step-by-Step Guide to Placing an OCO Order

Placing an OCO order varies slightly by platform but generally follows these steps: 1. Open a Position: First, buy the stock or asset (e.g., Buy 100 shares of XYZ at $50). 2. Select OCO: In your order entry window, look for "Advanced Orders" or "Order Type" and select "OCO" or "One-Cancels-Other." 3. Configure Leg 1 (Profit Target): Set this to "Sell," "Limit," and enter your target price (e.g., $55). 4. Configure Leg 2 (Stop Loss): Set this to "Sell," "Stop" (or "Stop Limit"), and enter your stop price (e.g., $48). 5. Review and Submit: Verify that the quantity matches your holding (100 shares) and that both prices are correct relative to the current market price. 6. Confirm Status: Check your "Working Orders" tab. You should see two orders linked by an OCO group ID.

Key Elements of an OCO Order

An OCO order comprises three critical components that define its functionality. First is the Linkage. The defining feature is the conditional link between the two orders. They are not independent; they are "bracketed." This software logic resides either on your broker's server or, for some exchanges, natively on the matching engine. Second is the Dual Nature. It combines two distinct order types: a *Limit Order* (for taking profit, placed above the current price for longs) and a *Stop Order* (for stopping loss, placed below the current price for longs). For short positions, this is reversed (Limit below, Stop above). Third is the Duration. OCO orders can be set as "Day" orders (expiring at market close) or "GTC" (Good-Till-Canceled). GTC is common for swing traders who hold positions for days or weeks, ensuring their protection remains in place overnight (though execution only happens during market hours unless specified otherwise).

Important Considerations for Traders

While powerful, OCO orders carry risks. Gap Risk is a major concern. If a stock closes at $52 and opens the next day at $40 (gapping down below your $48 stop), your stop order will trigger at the open, but you will be filled near $40, not $48. The OCO logic works, but the market conditions may lead to a larger-than-expected loss. Partial Fills can complicate things. If your limit order is partially filled (e.g., 50 of 100 shares sold at $55), the system usually reduces the quantity of the stop order correspondingly (to 50 shares), but some older platforms might cancel the entire remaining stop, leaving the residual 50 shares unprotected. Always check how your specific broker handles partial fills in OCO groups. Fees: Generally, there is no extra fee for placing an OCO order, but you will pay the standard commission (if any) when one of the legs executes. If you manually cancel and replace often, ensure you aren't incurring excessive data or order modification fees.

Real-World Example: Managing a Breakout Trade

Let's say you are trading Tesla (TSLA). It is currently trading at $200. You believe it will break out to $220, but if it falls below support at $190, the setup is invalid. You buy 10 shares at $200. To manage this, you place an OCO Order: * Leg 1 (Profit): Sell Limit 10 TSLA at $220. * Leg 2 (Loss): Sell Stop 10 TSLA at $190. Outcome: News breaks that TSLA has a new battery tech. The stock spikes to $220.50. * Your Limit Order at $220 executes. * You sell 10 shares for $2,200 total (Profit: $200). * The system immediately cancels your Stop Order at $190. * You are now flat with a locked-in profit, and no open orders to worry about.

1Entry Price: $200
2Target Price: $220
3Stop Price: $190
4Risk: $10/share ($200 - $190)
5Reward: $20/share ($220 - $200)
6Risk/Reward Ratio: 1:2
7Outcome: Limit hit, Stop canceled automatically.
Result: The OCO order successfully captured the profit and removed the risk of the stop order being triggered later.

Other Uses of OCO Orders

Beyond simple position management, OCO orders can be used for Entry Strategies. This is often called a "straddle" or "breakout" entry. Suppose a stock is trading in a tight range between $100 and $105. You don't know which way it will break, but you want to be on board for the move. You can place an OCO Entry Order: 1. Buy Stop at $105.50 (to catch the breakout upward). 2. Sell Stop (Short) at $99.50 (to catch the breakdown downward). If the price breaks $105.50, you get long, and the short-sell order is canceled. If it breaks $99.50, you get short, and the buy order is canceled. This allows you to trade the *volatility* without predicting the direction.

Common Beginner Mistakes

Avoid these errors when using OCO orders:

  • Setting Stops Too Tight: Placing your stop too close to the entry price can result in being "whipsawed" out of a trade by normal noise before the move begins.
  • Forgetting GTC: If you set an OCO as a "Day" order and the trade doesn't close today, tomorrow you wake up with an unprotected position because the orders expired.
  • Incorrect Order Types: Accidentally using a "Limit" instead of a "Stop" for the loss protection leg. This will cause an immediate fill at the current market price, closing your trade instantly.

FAQs

OCO stands for "One-Cancels-the-Other," where two existing orders are linked. OTO stands for "One-Triggers-the-Other." In an OTO, the second order is only placed *after* the primary order is filled. For example, "Buy at $50, and if filled, THEN place a Sell Limit at $55."

Yes, most platforms allow you to modify the price of either leg of an active OCO order. For instance, if the stock moves up, you might want to raise your stop price (trailing the stop) to lock in more profit. Modifying one leg typically keeps the link to the other leg intact.

It depends on your broker and how you configure the order. Standard stop orders often do not trigger in after-hours sessions due to low liquidity and wide spreads. Limit orders might. You usually need to specifically designate the order as "Extended Hours" for it to be active outside regular trading hours.

Not always. While some advanced exchanges support native OCO types, many retail brokers hold OCO orders on their own internal servers. When one leg is triggered, the broker's computer quickly sends the cancellation for the other leg to the exchange. This introduces a tiny latency but is generally negligible for most traders.

A Bracket Order is a specific type of OCO strategy used for managing an open position. It "brackets" the current price with a profit-taking limit order above and a stop-loss order below. Essentially, every Bracket Order uses OCO logic, but not every OCO is a Bracket (e.g., the entry breakout strategy).

The Bottom Line

The OCO (One-Cancels-the-Other) order is the cornerstone of disciplined, automated trading. By allowing you to pre-define both your winning and losing exit points, it removes the emotional burden of decision-making in the heat of the moment. Whether you are a day trader looking to scalp quick profits or a swing trader managing risk over weeks, the OCO order ensures that your trading plan is executed precisely as intended. It protects your capital from catastrophic loss while ensuring you don't miss profit targets due to hesitation. Mastering this order type is a critical step in moving from amateur gambling to professional trading.

At a Glance

Difficultyintermediate
Reading Time12 min
CategoryOrder Types

Key Takeaways

  • An OCO order allows traders to set both a profit target (limit order) and a loss limit (stop order) simultaneously.
  • When one side of the order is filled (executed), the trading platform automatically cancels the remaining order to prevent unintended positions.
  • This order type is essential for automated trade management, freeing traders from the need to constantly monitor the market.
  • It is widely used in volatile markets where prices can move rapidly in either direction.