An OCO order, short for One-Cancels-the-Other, is a conditional order that links two separate entry or exit orders so that when one is executed, the other is automatically cancelled. This tool lets a trader define both a profit target and a stop-loss level simultaneously, or place two competing entry orders, without needing to watch the market. It removes the risk of both orders filling and creating an unintended double position, while enforcing a disciplined exit strategy.
How an OCO Order Works An OCO order consists of two legs. The moment one leg is fully or partially filled, the broker’s system immediately cancels the other. The two orders are placed at the same time and remain active until one triggers. The most common combination is a limit order to take profit and a stop-loss order to cap losses. For a long position, the limit order sits above the current price, and the stop-loss sits below. For a short position, the limit order goes below the market, and the stop-loss above. Some platforms also allow two limit orders (e.g., to enter a breakout in either direction) or two stop orders as an OCO pair.
Key Components of an OCO Order
Primary order: The first order placed, often the profit target limit order.
Secondary order: The protective stop-loss or alternative entry order.
Cancellation logic: Execution of one order removes the other instantly. Partial fills may cancel the remaining quantity of the unfilled order, depending on the broker.
Time-in-force: OCO orders are usually good-till-cancelled (GTC) or day orders. Check your platform’s settings.
Practical Example: Managing a Long Position Suppose a trader buys 100 shares of XYZ at $50. They want to sell if the price rises to $55 for a $5 gain, but also want to limit the loss to $2 per share if the trade goes wrong. They place an OCO order with two sell orders:
A limit sell order at $55
A stop-loss sell order at $48 (with the stop price at $48, triggering a market or limit sell)
Scenario A: Price climbs to $55. The limit order fills, selling the shares for a $500 profit. The stop-loss at $48 is cancelled automatically. Scenario B: Price falls to $48. The stop-loss triggers, selling the shares for a $200 loss. The limit order at $55 is cancelled. Without the OCO, the trader would have to manually cancel the other order after one fills, risking a double fill if the market whipsaws. The OCO enforces the exit plan.
When to Use an OCO Order
Breakout trading: Place an OCO with a buy stop above resistance and a sell stop below support. If the price breaks either level, you enter in that direction, and the opposite order cancels.
Range-bound markets: Set a take-profit limit near the range top and a stop-loss near the range bottom. This automates exits without constant monitoring.
News events: Before high-impact announcements, an OCO entry order can capture a sharp move in either direction while avoiding a false breakout.
Position management: Immediately after entering a trade, attach an OCO to define both risk and reward, turning the trade into a set-and-forget position.
OCO Order Checklist Use this checklist before placing an OCO order:
Determine your entry price and position size.
Decide your profit target (based on resistance, Fibonacci extension, or risk-reward ratio) and your stop-loss level (based on support, volatility, or maximum acceptable loss).
Confirm the order types: limit for profit, stop or stop-limit for loss. A stop-limit order adds a limit price to avoid slippage but may not fill if the price gaps.
Set the time-in-force: GTC for swing trades, day order for intraday.
Verify that the two orders are correctly linked as OCO on your trading platform. Some platforms call this a “bracket order” when attached to an existing position.
Double-check quantities: both legs should match the position size to avoid a partial close.
Review the order ticket for any warnings about order rejection (e.g., price too close to market).
Submit the OCO order and note the order ID for tracking.
Risks and Limitations OCO orders do not guarantee fills at the exact specified prices. During fast markets, slippage can cause a stop-loss to execute at a worse price than the stop level. If using a stop-limit order, the limit price might not be reached, leaving the position open and exposed to further losses. Partial fills on one leg may leave a residual position; check whether your broker cancels the entire other leg or only the filled quantity. Not all brokers offer OCO orders on all instruments, and some platforms require manual linking of orders. When trading leveraged products like CFDs, forex, or crypto derivatives, an OCO order does not limit the risk of negative balance or margin calls if the market gaps dramatically. Always use appropriate position sizing and never rely solely on an OCO as a substitute for risk management.
OCO Orders vs. Other Order Types
Bracket order: Similar to an OCO but typically attached directly to an entry order. A bracket order creates a take-profit limit and a stop-loss automatically when the entry fills. An OCO can be used independently for exits or entries.
OSO (One-Sends-the-Other): An OSO triggers a second order when the first fills. For example, if a limit entry fills, it sends an OCO bracket. OCO cancels one order when the other fills; OSO sends a new order.
Trailing stop: A dynamic stop-loss that moves with the price. An OCO is static once set, though some platforms allow combining a trailing stop with a limit order in an OCO.
By linking two orders into a single conditional instruction, an OCO order helps traders execute a pre-planned strategy with reduced emotional interference. It is a core tool for anyone who wants to automate exits, manage risk, and avoid the pitfalls of manual order cancellation.
Prepared with AlphaScala editorial tooling, examples, and risk-context checks against our education standards. General education only, not personalized financial advice.