What Is an OCO Order?
An OCO order, short for One Cancels the Other, is a pair of conditional orders placed simultaneously, where the execution of one automatically cancels the other.
It allows traders to plan for two possible outcomes without having to watch the market constantly. If the market moves one way, the relevant order is executed, and the other is cancelled. If it moves the other way, the opposite happens. In this article, we’ll examine how OCO orders work, when traders use them and how to place one.
The information in this article is provided for educational purposes only and does not constitute financial advice. Consult a financial advisor before making investment decisions.
Table of Contents
How an OCO Order Works
An OCO order links two separate pending orders in a single instruction.
These two orders coexist until the market reaches one of the price levels specified in the instruction, at which point, the relevant order is triggered and executed whilst the other is automatically cancelled.
The two parts of an OCO order can take different forms depending on the strategy: two stop orders, two limit orders or one of each. Each order sits at a different price level, one above the current market price and one below.
The Two Orders Inside an OCO
Here's how the two orders typically function:
- Stop order: Triggers a buy or sell order when the price reaches a predetermined level. The order is executed at the next available price.
- Limit order: Also triggered when price reaches a specified level; however, the order only executes at the predetermined price or better.
When the market hits either price level, the respective order executes and the other is immediately removed, meaning there are no leftover orders to manage manually.
A simple example: a trader holds a stock currently priced at $50. They set an OCO order comprised of a limit order to sell at $58 and a stop order to sell at $44. If the price rises to $58, the limit order executes and the stop is cancelled; if the price falls to $44, the stop order executes and the limit is cancelled. Either way, only one order is executed.
When to Use an OCO Order
Two of the most common scenarios when a trader might use an OCO order are:
- Trading breakouts or around news events: When a price move is expected but the direction is unknown.
- Managing an exit on an open position: When a trader wants to mitigate risk and lock in potential profits.
Trading Breakouts and Around News Events
One of the most common applications is trading breakouts and around major news releases, situations where a significant price move is expected but the direction is uncertain.
For example, imagine a trader is watching the EURUSD currency pair ahead of a Federal Reserve interest rate decision. In anticipation of a sharp move in either direction, the trader might place an OCO order with a buy stop and sell stop either side of the current market price.
If the decision results in the dollar strengthening, the price of EURUSD drops, triggering the sell stop and cancelling the buy stop. Conversely, if the decision results in the dollar weakening, the price rises, the buy stop executes and the sell stop is cancelled.
Either way, the trader ends up with a position in the direction of the move without having to predict it or react to the news in real time. Moreover, the trader doesn’t need to worry about the opposite order remaining active, which is why traders might use an OCO order in this situation rather than placing two independent ones.
Two independent orders have no awareness of each other; if one executes, the other remains active until it’s either manually cancelled or triggered by market conditions. In a fast-moving market, this can result in an unwanted second position opening before a trader has the chance to intervene.
Exiting an Open Position
OCO orders can also be used to manage the exit of an existing position by pairing a stop order and a limit order. The stop order limits losses if the price moves against you, whilst the limit order locks in potential profits.
For example, a trader holding shares in a company priced at $50 might choose to open an OCO order with a limit order to sell at $60 and a stop order to sell at $42.
If the shares rise to $60, the limit order executes and the profit is locked in. On the other hand, if the market moves the other way and the shares fall to $42, the stop order triggers, preventing further losses. Again, once either order is executed, the other is automatically cancelled.
Advantages and Limitations of OCO Orders
Whilst OCO orders offer practical benefits, they also come with some limitations which are worth understanding before using them.
Advantages
- Automation: Once placed, the OCO executes without any further input required, meaning there's no need to monitor the market whilst waiting for a move.
- Removes emotional decision-making: Because the conditions are set in advance, the trader doesn't have to make a decision in real-time.
- Order management: When one order executes, the other disappears automatically, removing the risk of an extra order remaining open and triggering an undesired trade.
- Works across strategies: Useful for breakout entries, entries around news events, exit management on open positions and various other setups depending on the trader's approach.
Limitations
- Stop order slippage: When the stop order within an OCO is triggered, it executes at the next available price, which means the execution price may be worse than what was specified.
- Not natively available on all platforms: For example, MetaTrader 4 and MetaTrader 5 do not support OCO orders as standard. Traders require a plugin or Expert Advisor to enable this functionality.
- Position management may require manual input: Once an OCO has executed and a position is open, stop loss and take profit orders may need to be set separately depending on the platform. Some platforms allow these to be configured within the OCO order itself, others do not.
How to Place an OCO Order
Whilst the exact process varies depending on the platform in question, placing an OCO order generally involves the following steps:
- Select the market you want to trade.
- Choose the OCO order type.
- Set the two price levels for each pending order, one above the current market price and one below.
- Select your order size.
- Confirm any stop loss, take profit or expiry settings.
- Submit the order. Both orders remain active until one is triggered or the order expires.
As noted in the limitations above, OCO orders are not available as standard on either MT4 or MT5. In order to use an OCO order on either platform, traders will need an additional plugin or Expert Adviser.
The MetaTrader Supreme Edition (MTSE) plugin, available for both MT4 and MT5, includes OCOs as one of its additional order types.
Once MTSE is installed, OCO orders are accessible using the Mini Terminal, a tool designed to help place and manage orders. In order to use this tool, traders must ensure that automated trading is enabled within the MetaTrader platform.
To place an OCO breakout order via the Mini Terminal in MTSE:
- Find the Mini Terminal in the list of Expert Advisers in the Navigation window on the right-hand side of the screen.
- Click and drag the Mini Terminal onto your open chart screen to open the tool.
- Click the orange order icon in the top right-hand corner of the Mini Terminal (highlighted below) to open the order menu.
- Under order type, select OCO Breakout.
- For the buy stop and sell stop entries, traders can either set a specific price level or a distance in pips from the current price level.
- Choose a lot size and, optionally, configure stop loss, take profit and trailing stop parameters.
- Place the order. Both stop orders will become active and linked.
Conclusion
An OCO order is a tool which allows traders to plan for two possible market outcomes simultaneously without having to monitor the market in real time. By linking the two orders so that the execution of one automatically cancels the other, it removes the risk of being left with an undesired pending order.
OCO orders are not natively available on MT4 or MT5, but the functionality can be added via a plugin or Expert Adviser. For traders who use other platforms, availability varies and is worth checking before incorporating into a strategy.
Other Articles You Might Be Interested In:
Frequently Asked Questions
What does OCO stand for?
OCO stands for "one cancels the other." It refers to a pair of linked pending orders, where the execution of one automatically cancels the other, ensuring only one outcome occurs.
What is the difference between an OCO order and a stop loss?
A stop loss is a single order designed to close an open position if the price moves against the trader beyond a predetermined level. An OCO order is a pair of linked orders covering two different scenarios simultaneously; a stop loss can form one part of an OCO, but the two are not the same thing.
Can you use OCO orders when trading stocks?
Yes. OCO orders can be used in stock trading as well as forex, provided the platform supports them. A stock trader might use an OCO order to set a limit order above the current share price and a stop order below it, so that whichever is reached first exits the trade and the other order is automatically cancelled.
What happens if neither OCO order is triggered?
If the market doesn't reach either of the specified price levels, both orders will remain active. Many platforms allow a trader to set an expiry on pending orders, after which both orders are cancelled automatically if neither has been triggered.
Are OCO orders available on all trading platforms?
No. Some platforms offer OCO orders natively, whilst others, such as MT4 and MT5, may require a plugin or Expert Advisor to use them.
What is the difference between an OCO order and a bracket order?
A bracket order combines an entry order with both a stop loss and a take profit around the resulting position, "bracketing" the trade on both sides. An OCO order links two pending orders so that when one executes, the other is cancelled. Whilst some bracket orders use OCO logic for the exit side, the two are not the same thing.
INFORMATION ABOUT ANALYTICAL MATERIALS:
The given data provides additional information regarding all analysis, estimates, prognosis, forecasts, market reviews, weekly outlooks or other similar assessments or information (hereinafter “Analysis”) published on the websites of Admirals investment firms operating under the Admirals trademark (hereinafter “Admirals”) Before making any investment decisions please pay close attention to the following:
- This is a marketing communication. The content is published for informative purposes only and is in no way to be construed as investment advice or recommendation. It has not been prepared in accordance with legal requirements designed to promote the independence of investment research, and that it is not subject to any prohibition on dealing ahead of the dissemination of investment research.
- Any investment decision is made by each client alone whereas Admirals shall not be responsible for any loss or damage arising from any such decision, whether or not based on the content.
- With view to protecting the interests of our clients and the objectivity of the Analysis, Admirals has established relevant internal procedures for prevention and management of conflicts of interest.
- The Analysis is prepared by an analyst (hereinafter “Author”), with the assistance of AI tools. The Author Roberto Rivero is a contractor for Admirals. This content is a marketing communication and does not constitute independent financial research.
- Whilst every reasonable effort is taken to ensure that all sources of the content are reliable and that all information is presented, as much as possible, in an understandable, timely, precise and complete manner, Admirals does not guarantee the accuracy or completeness of any information contained within the Analysis.
- Any kind of past or modelled performance of financial instruments indicated within the content should not be construed as an express or implied promise, guarantee or implication by Admirals for any future performance. The value of the financial instrument may both increase and decrease and the preservation of the asset value is not guaranteed.
- Leveraged products (including contracts for difference) are speculative in nature and may result in losses or profit. Before you start trading, please ensure that you fully understand the risks involved.