How to use One Cancels Other (OCO) orders for automated exits
A One Cancels Other (OCO) order lets you place two orders at the same time: a limit order to take profit and a stop order to prevent losses. When one order executes, the other is automatically canceled.
What is a One Cancels Other (OCO) Order?
Imagine you buy a stock for 100 rupees. You have a plan. If it hits 110, you want to sell and take your profit. If it drops to 95, you want to sell to cut your losses. How do you place both orders? If you place a regular sell order at 110, what happens if the stock falls? You're stuck. This is where advanced stock nifty-and-sensex/avoid-slippage-nifty-futures-orders">market order types, like the One Cancels Other (OCO) order, come into play.
An OCO order is a pair of orders linked together. It consists of two separate orders:
- A limit order, which is typically your profit target.
- A stop order, which is your ma-buy-or-wait">stop-loss.
The "One Cancels Other" part is the magic. As soon as one of these orders gets filled, the other one is automatically cancelled by the system. You can’t have both a profit and a loss on the same trade. The OCO order ensures this. It's a simple but powerful tool for automating your exit strategy.
How to Place Different Types of OCO Orders
Placing an OCO order is straightforward once you understand the components. Here are the steps most mcx-and-commodity-trading/mcx-trading-apps-desktop-software-better">trading platforms follow.
Step 1: Own the Asset
OCO orders are typically used for exits. This means you must already have a position. You have already bought the shares of the company you want to trade. For our example, let's say you own 50 shares of ABC Corp.
Step 2: Find the OCO Order Option
In your broker's trading terminal, go to the sell screen. Instead of choosing a simple "Market" or "Limit" order, look for advanced options. You will often find "OCO" or "Bracket Order" (which is a similar concept). Select OCO.
Step 3: Set Your Profit Target (The Limit Order)
This is the price at which you want to sell for a profit. The system will ask for a "Limit Price". If you bought at 100 rupees and your target is 110, you will enter 110 as your limit price. This creates a sell limit order at 110.
Step 4: Set Your Stop-Loss (The Stop Order)
This is the price that protects you from large losses. The system will ask for a "Stop Price" or "Trigger Price". If you want to sell if the stock drops to 95 rupees, you will enter 95 here. This creates a sell stop order. Some platforms might also ask for a limit price for the stop, creating a stop-limit order, which gives you more control over the execution price after the stop is triggered.
Step 5: Define Quantity and Duration
Enter the number of shares you want to sell (e.g., all 50 shares). You also need to choose the order's duration. A "Day" order expires at the end of the trading day. A "Good 'til Canceled" (GTC) order remains active until it is filled or you manually cancel it.
Step 6: Review and Place the Order
Your screen should now show a summary. It will state that you are placing an OCO order to sell 50 shares of ABC Corp with a limit price of 110 and a stop price of 95. Double-check everything. If it looks correct, submit the order.
A Practical OCO Order Example
Let's make this crystal clear. You believe XYZ stock is a good buy, but you are also aware of the risks.
Your Trade Plan:
- Entry: You buy 100 shares of XYZ at 200 rupees per share.
- Profit Goal: You want to sell if the price reaches 220 rupees.
- Maximum Loss: You are not willing to lose more than 10 rupees per share, so you want to sell if it drops to 190 rupees.
You place an OCO sell order. Here are the two connected parts:
- The Limit Order (Profit Taker): Sell 100 shares of XYZ at a limit price of 220.
- The Stop Order (Loss Preventer): Sell 100 shares of XYZ if the price falls to a stop price of 190.
Now, two main things can happen:
- Scenario A: The stock price goes up. If the price of XYZ hits 220, your limit order is triggered and your 100 shares are sold. You lock in your profit. Instantly, the stop order at 190 is automatically cancelled.
- Scenario B: The stock price goes down. If the price of XYZ falls and hits 190, your stop order is triggered, and your 100 shares are sold. You limit your loss. Instantly, the limit order at 220 is automatically cancelled.
This structure ensures you have a clear plan that executes automatically, regardless of which direction the market moves first.
| Component | Setting | Purpose |
|---|---|---|
| Current Position | 100 shares of XYZ @ 200 | The asset you are managing. |
| Limit Order Price | 220 | Your profit target. |
| Stop Order Price | 190 | Your maximum acceptable loss point. |
| Order Link | OCO | Ensures one order cancels the other. |
Why You Should Consider Using OCO Orders
Among the different stock market order types, OCO orders offer distinct advantages, especially for traders who cannot watch the markets all day.
Enforces Trading Discipline
Fear and greed are a trader's worst enemies. An OCO order forces you to define your exit points before emotions take over. You set your profit and loss levels based on your strategy, not on a gut feeling during a volatile market move.
Automates Risk Management
A stop-loss is the most basic investing-volatile-financial-stocks">risk management tool. An OCO order takes it a step further by automating both your risk (stop-loss) and your reward (profit target). You know exactly how much you stand to make or lose on a trade from the moment you place the order.
Saves Time and Reduces Stress
You don't have to be glued to your screen waiting for a price to hit your target. Place the OCO order and you can step away. Your plan is in the system, ready to execute whether you are watching or not. This frees up your mental energy for finding the next opportunity.
Common Mistakes When Using OCOs
While powerful, OCO orders can cause problems if used incorrectly.
- Setting Prices Too Close: If your stop-loss and limit prices are too close to your entry price, normal market noise can trigger one of them prematurely. For example, setting a stop at 99 and a target at 101 on a 100-rupee stock is often too tight. Give the trade some room to breathe.
- Ignoring Order Duration: If you place a "Day" OCO order and neither target is hit by the close of the market, the entire order expires. Your position is now unprotected. For trades you plan to hold for more than a day, use a "Good 'til Canceled" (GTC) order.
- Not Understanding Your Broker's Rules: Does your broker use stop-market or stop-limit orders within the OCO? A stop-market order sells at the next available price after the stop is triggered, which can lead to slippage. A stop-limit order becomes a limit order, which may not get filled if the price gaps down aggressively. Know what you are using. You can often find this information in a broker's FAQ or help section, like the ones provided by the National Stock Exchange of India (NSE) on order types.
By avoiding these simple errors, you can make OCO orders a reliable part of your trading toolkit. They are a fantastic way to bring structure and automation to your exit strategy, helping you trade more like a professional.
Frequently Asked Questions
- What is the main benefit of an OCO order?
- The main benefit is automation. It allows you to set both a profit target and a stop-loss simultaneously, removing emotion and the need to constantly watch the market.
- Can I use an OCO order to enter a position?
- Yes, though it's less common. You could place a buy stop order above the current price (for a breakout) and a buy limit order below the current price (for a dip), with one canceling the other. Most traders use OCOs for exits.
- What happens if I manually cancel one part of my OCO order?
- If you manually cancel either the stop-loss or the limit order, most brokerage platforms will automatically cancel the other part of the OCO pair as well. Always confirm your broker's specific rules.
- Are OCO orders available with all brokers?
- No. While many brokers offer OCO functionality, especially those focused on active trading, it is not a universal feature. You should check your broker's platform to see if they support this and other advanced stock market order types.