Northmark

OCO Order (One-Cancels-the-Other)

An OCO (One-Cancels-the-Other) order is a conditional order pair where the execution of one order automatically cancels the other, allowing a trader to set both a profit target and a stop-loss simultaneously.

Quick Definition Box

An OCO order combines two separate orders (typically a stop-loss and a take-profit) into a single instruction. When one order fills, the other is immediately canceled. This ensures that only one of the two outcomes occurs, preventing accidental double exposure and automating risk management.

Detailed Explanation

An OCO order is a powerful risk-management tool that links two pending orders. The "One-Cancels-the-Other" logic means that when one of the two orders is triggered and filled, the remaining order is automatically removed from the order book. This is particularly useful in volatile markets where price can move quickly in either direction.

To understand how it works, consider a trader who buys EUR/USD at 1.1000. They want to limit potential losses if the price falls, but also want to lock in profits if it rises. Without an OCO order, they would need to place two separate orders: a stop-loss at 1.0950 and a take-profit at 1.1100. The problem is that if both orders are active simultaneously, there is a risk that both could be triggered in a fast-moving market—especially if there is a sudden spike that hits both levels before the broker can cancel the second order. An OCO order eliminates this risk by linking the two orders.

The mechanics are straightforward. The trader specifies two orders: one is a stop order (usually a stop-loss) and the other is a limit order (usually a take-profit). Both are placed at the same time, but they are linked. If the market reaches the stop-loss level first, the stop order executes, and the take-profit order is canceled. Conversely, if the market reaches the take-profit level first, the limit order fills, and the stop-loss is canceled.

OCO orders are particularly valuable in ranging or uncertain markets where a trader expects a breakout in either direction but wants to be protected on both sides. They are also used to manage open positions by setting a trailing stop and a profit target simultaneously. However, it is important to note that OCO orders are not available on all trading platforms, and some brokers may implement them differently—for example, as a "bracket order" or "OCO bracket."

The key advantage of an OCO order is that it automates decision-making. Once the order is placed, the trader does not need to monitor the market constantly. This reduces emotional trading and ensures that both risk and reward are predefined. However, like all conditional orders, OCO orders are subject to slippage, especially during high-volatility events or when market gaps occur.

Real-World Example

Let’s walk through a concrete example. Suppose a trader is trading GBP/USD and the current price is 1.2700. They believe the price will either rise to 1.2800 or fall to 1.2600, but they are not sure which direction will prevail. They decide to place an OCO order:

For simplicity, assume the trader is long (bought) at 1.2700. They place:

These two orders are linked as an OCO. Now, two scenarios can play out:

Scenario 1: Price rises to 1.2800.
The take-profit order triggers, the trader sells at 1.2800, locking in a profit of 100 pips (1.2800 – 1.2700). The stop-loss at 1.2600 is automatically canceled. The trade is closed with a profit.

Scenario 2: Price falls to 1.2600.
The stop-loss order triggers, the trader sells at 1.2600, limiting the loss to 100 pips (1.2700 – 1.2600). The take-profit at 1.2800 is automatically canceled. The trade is closed with a loss.

In both cases, only one order executes. The trader never has to worry about both orders being filled, which would result in an unintended position. This is the core value of an OCO order.

Why It Matters for Traders

OCO orders are essential for disciplined risk management. They allow traders to define both their maximum acceptable loss and their desired profit target before entering a trade. This is particularly important in forex and CFD trading, where leverage can amplify both gains and losses.

By using an OCO order, a trader can:

However, it is crucial to understand that OCO orders do not guarantee execution at the exact price specified. During fast-moving markets, slippage can occur, meaning the actual fill price may be worse than the stop or limit level. Additionally, if the market gaps (e.g., over a weekend or during a news event), the stop-loss may be filled at a significantly worse price.

Common Misconceptions

Misconception 1: "OCO orders are the same as a stop-loss and take-profit placed separately."
This is false. While the individual orders are similar, the key difference is the cancellation mechanism. With separate orders, both remain active and could theoretically both be triggered in a volatile spike. An OCO order ensures that only one can execute.

Misconception 2: "OCO orders are only for exiting trades."
While they are commonly used to exit a position, OCO orders can also be used to enter trades. For example, a trader can place a buy stop above the current price and a sell stop below it, with the intention of entering in the direction of the breakout. Whichever order triggers first becomes the entry, and the other is canceled.

Misconception 3: "OCO orders protect against all market gaps."
No. If the market gaps through the stop-loss level (e.g., due to a major news event), the order will be filled at the next available price, which could be much worse than the stop level. OCO orders reduce risk but do not eliminate it.

Related Terms

How XM Compares

XM offers a range of order types, including OCO orders, on its trading platforms. The exact implementation may vary depending on the platform version (e.g., MT4, MT5, or XM’s proprietary app). Traders should verify the availability and specific rules for OCO orders on XM’s official website or platform documentation. XM also provides educational resources on risk management, but it is always advisable to test order types on a demo account before using them in live trading. For the most current information, please refer to XM’s official pages.

Compliance Footer

⚠️ This glossary entry is educational. Forex/CFD trading carries high risk. This is not investment advice.


See all glossary entries: /en/glossary

Compare top forex brokers