How Do I Place an OCO (One-Cancels-the-Other) Order in My Trading Platform

An OCO order is two orders linked together: when one fills, the other is automatically cancelled. It is the standard way to place a stop and a limit at the same time.

Disclaimer

This is not investment advice. The information provided is for educational and informational purposes only and does not constitute a recommendation to buy or sell any financial product.

An OCO (one-cancels-the-other) order is a pair of orders linked together. When one of the two orders fills, the other is automatically cancelled by the platform. The most common use is to place a stop loss and a take profit at the same time on an open position. If the price hits the target, the position is closed at the target and the stop is cancelled. If the price hits the stop, the position is closed at the stop and the target is cancelled.

The mechanics

The OCO is a single order ticket in the platform, but it is actually two separate orders that the platform manages together. The trader specifies two prices: the stop price and the limit price. The order ticket is submitted, and the platform sends both orders to the broker's order book. The orders sit in the book, and the trader can see both in the open orders list. When one of the two orders fills, the platform receives the fill confirmation from the broker and automatically cancels the other.

The cancellation is instant, but it is not always atomic. In a fast market, both orders can fill in the same second, and the platform can be left with two filled orders on the same position. The broker's order management system usually catches this and reverses one of the fills, but the trader should be aware of the small risk of a double fill. The risk is highest in a thinly traded stock or in a fast market around a news event.

When to use an OCO

The most common use is on an open position. The trader enters a long position, sets a stop below the entry to limit the loss, and sets a target above the entry to take the profit. The two orders are linked as an OCO, and the trader does not need to monitor the position. The platform handles the exit, and the trader is free to focus on the next trade.

A second use is on a pending entry. The trader wants to enter a long position if the price breaks above a level, and the trader wants a stop loss in case the breakout fails. The trader places a buy stop above the level and a sell stop below the level, and the two orders are linked as an OCO. If the buy stop fills, the sell stop is cancelled. If the price never reaches the buy stop, the sell stop is also cancelled at the end of the day or at the trader's discretion.

A third use is on a short position. The trader enters a short, sets a stop above the entry to limit the loss, and sets a target below the entry to take the profit. The OCO mechanics are the same, with the side of the orders reversed.

How to set the prices

The stop price is the level at which the trader is willing to accept a loss. The target price is the level at which the trader is willing to take a profit. The two prices are a function of the trader's strategy, the trader's risk tolerance, and the volatility of the underlying.

A common rule is to set the stop at a level that produces a 1% loss on the account, and to set the target at a level that produces a 2% or 3% gain. The risk-reward ratio is 1:2 or 1:3, and the strategy is profitable on a 40% win rate. The trader who can produce a 40% win rate on a 1:2 risk-reward strategy is profitable over time, and the OCO is the tool that enforces the discipline.

A second rule is to set the stop and the target at levels that are meaningful in the price structure of the underlying. A stop just below a recent support level is a structural stop, and a target just below a recent resistance level is a structural target. The levels are more likely to be respected by the market, and the trader is less likely to be stopped out at the worst moment.

The platform variations

Not all platforms support OCO orders in the same way. Some platforms have a dedicated OCO order ticket, where the trader enters the two prices and the platform handles the linking. Some platforms require the trader to place the two orders separately and then link them manually, usually by right-clicking on one of the orders and selecting "link to OCO." Some platforms do not support OCO orders at all, and the trader has to manage the two orders manually.

A platform that supports OCO orders is a real convenience for active traders. The trader who places OCO orders on every position can run a portfolio of positions without monitoring the screen, and the platform handles the exits. The trader who has to manage the orders manually is exposed to the risk of forgetting to cancel the unfilled order, and the unfilled order can fill at the worst moment.

The risk of an OCO

The main risk is the gap. A stop loss order is a stop loss order, and the OCO does not protect against a gap. If the price gaps through the stop price, the stop is filled at the next available price, which can be much worse than the stop. The OCO cancels the target after the stop fills, but the loss is the loss. The trader who holds a position over a known event is exposed to the gap, and the OCO does not protect against it.

A second risk is the platform failure. If the platform crashes or loses connection after one of the orders fills, the other order is not cancelled automatically. The trader returns to the platform and finds the second order still in the book, and the trader has to cancel it manually. The risk is small, and the broker's order management system usually catches the failure, but the trader should be aware of the risk.

Related resources

Where to start

If you are placing OCO orders for the first time, the most useful exercise is to set the stop and the target on a small position, and to monitor the platform to see how the cancellation works. Our broker comparison lists the order types available at each broker, which together tell you whether OCO is supported and how it is implemented.