How an OCO Order Works in Stock and Forex Trading

| 9 min read
Diagram showing how an OCO order executes one trade and cancels the other
FacebookX

Tracking market prices throughout the trading day is difficult when you have a full-time job or other responsibilities. If you place separate orders to take profits and cut losses, a sudden price swing could trigger both orders and leave you with an unintended open position. An OCO order solves this problem by linking two conditional exit orders together so that only one can ever execute. This guide explains the exact mechanics behind this order type, walks through a realistic rupee example, and shows how Indian investors use it through broker GTT (Good Till Triggered) features.


Quick Takeaways

  • An OCO (One Cancels the Other) order links a profit target and a stop-loss order into a single conditional setup.
  • When the market reaches either price level first, that order executes and the broker’s system automatically cancels the remaining order.
  • While OCO setups automate trade exits, sudden price gaps or low market liquidity can still cause orders to fill worse than expected or remain unexecuted.

By Monetyra Editorial Team


What Is an OCO Order in Trading?

An OCO order (One Cancels the Other) is a conditional pair of linked trading instructions where the execution of one order automatically cancels the second.

Instead of manually watching charts to close a position, you set two opposite boundaries around your current trade: one price level to lock in gains and another to cap potential losses. Because the two instructions are connected inside your broker’s order management system, you avoid the risk of accidentally executing two separate sell orders on the same holding. Traders use this setup across equities, derivatives, and currency markets whenever they want predefined exit rules.


How Does an OCO Order Work?

An OCO setup works by combining a limit order above the market with a stop order below the market (for a long position) into one linked pair. Understanding different types of trading orders helps clarify why this pairing is useful: each leg serves an opposite market scenario.

For a stock or currency pair you already own, the two legs operate as follows:

  • Take-Profit Leg (Limit Order): Placed above the current market price to sell your holding once it reaches your target gain.
  • Stop-Loss Leg (Stop Order): Placed below the current market price to exit your holding if the price drops to your maximum acceptable loss.

The broker monitors both trigger conditions simultaneously. The moment market prices touch either trigger, that leg enters the exchange order book for execution, and the paired leg disappears immediately. Learning how stop-loss and take-profit orders interact is the foundation of using this setup safely.


OCO Order Example in the Indian Stock Market

A numeric example makes the two-way trigger mechanism easier to picture before you place a live trade. In this hypothetical example, suppose you purchase 100 shares of an Indian company listed on the NSE at ₹500 per share, investing ₹50,000 in total.

You want to aim for a 10% gain while limiting your downside risk to 5%. Before stepping away from your screen, you place an OCO sell order with two parameters:

  • Target Sell Limit: ₹550 per share (potential profit of ₹5,000 before brokerage and taxes)
  • Stop-Loss Trigger: ₹475 per share (maximum planned loss of ₹2,500 before charges)
Market ScenarioPrice ActionTake-Profit Leg
(₹550)
Stop-Loss Leg
(₹475)
Net Outcome
(Before Charges)
Scenario A: RallyPrice rises to ₹550Executes at ₹550 or betterAutomatically canceled+₹5,000 gain
Scenario B: DropPrice falls to ₹475Automatically canceledTriggers sell order−₹2,500 loss

If the stock stays between ₹476 and ₹549, both legs remain active and waiting. Only one exit path can ever complete.


How to Use an OCO Order via GTT in India

In the Indian equity market, retail investors most commonly access OCO functionality through a broker’s GTT (Good Till Triggered) feature. Standard exchange orders on the National Stock Exchange (NSE) expire at the end of the trading session at 3:30 PM IST if unexecuted. A GTT OCO setup solves this limitation by storing your two exit conditions on the broker’s server until a price trigger occurs. Most leading Indian brokers (such as Zerodha, Groww, and Upstox) keep GTT OCO orders valid for up to one year from creation at no additional fee, charging standard brokerage only if and when an order is triggered and executed.

To place a GTT OCO sell order on a delivery (CNC) stock holding in your demat account, follow these steps:

  1. Select the Holding: Open your portfolio or holdings tab and choose the stock you wish to protect.
  2. Choose GTT OCO Sell: Select the “Create GTT” option and pick the “OCO” trigger type rather than a single trigger.
  3. Enter the Stop-Loss Parameters: Input your stop-loss trigger price and the limit price at which you want the sell order sent to the exchange.
  4. Enter the Target Parameters: Input your profit-target trigger price and corresponding limit price above the current market price.
  5. Authorize and Confirm: Review the quantities, verify CDSL/NSDL e-DIS authorization if required by your broker, and submit the instruction.

Indian brokers operate under SEBI regulations and must also follow exchange circulars from the National Stock Exchange (NSE), which affect how stop-loss orders can be placed in some segments. To prevent freak trades, the NSE does not allow Stop-Loss Market (SL-M) orders on index and stock options, so you need to use Stop-Loss Limit (SL-L) orders there. Many brokers’ GTT OCO setups send a limit order (SL-L) when triggered, so you may need to specify both a trigger price and a limit price in advance.


OCO Order vs. Bracket Order and Cover Order

Traders often confuse OCO setups with bracket orders and cover orders because all three automate risk management. The main difference lies in whether the entry order is included and whether the setup works for overnight delivery trades.

Understanding how a bracket order works shows that a bracket order bundles three legs—an initial entry order, a target, and a stop-loss—usually restricted to intraday sessions. Similarly, knowing what a cover order is highlights that a cover order pairs a market or limit entry with a mandatory stop-loss only, without a profit target.

FeatureOCO Order (via GTT)Bracket Order (BO)Cover Order (CO)
Number of Legs2 exit legs (Target + Stop-loss)3 legs (Entry + Target + Stop-loss)2 legs (Entry + Stop-loss)
Entry Order Included?No (placed on existing positions)YesYes
Typical ValidityMulti-day / up to 1 year (broker-dependent)Intraday only (auto square-off)Intraday only (auto square-off)
Profit Target LegIncludedIncludedNot included

Benefits and Risks of Using an OCO Order

While automating your exits removes emotional hesitation during fast price swings, an OCO setup is not a guarantee against losses. Weighing both advantages and execution risks helps you decide when to rely on conditional triggers.

Key Benefits

  • Automated Discipline: Locks in your exit plan ahead of time so fear or greed does not cause you to move your stop-loss further away.
  • Screen-Free Monitoring: Allows employed investors to manage open equity or currency positions without checking charts every few minutes.
  • Prevents Duplicate Orders: Eliminates the mistake of leaving an active limit sell order open after a stop-loss has already closed your position.

Key Risks and Limitations

  • Gap-Down Execution Risk: If negative overnight news causes a stock to open sharply below your stop-loss limit price, your order may sit unfilled on the order book while prices drop further.
  • Slippage in Fast Markets: During sudden volatility or low liquidity, the actual fill price can differ noticeably from your trigger price.
  • Broker Dependency: Because GTT OCO orders reside on the broker’s servers until triggered, server outages or missing demat pre-authorization (DDPI/e-DIS) can block order execution.

Monetyra’s Take

An OCO order is a strong discipline tool for busy investors, though it shouldn’t be treated as a “set-and-forget” guarantee. Combining OCO setups with a broker’s GTT feature lets Indian investors automate exits on delivery holdings without watching charts all day. Still, because triggered stop-loss orders are often sent to the exchange as limit orders, sharp morning gap-downs can skip past tight stop-losses. Use OCO orders to take emotion out of your exits, but always leave a realistic limit buffer and ensure your demat pre-authorization (DDPI/e-DIS) is active so your orders trigger properly.


Conclusion

An OCO order gives you a structured way to manage both upside targets and downside protection in a single linked instruction. By pairing a profit-taking limit order with a protective stop-loss, you ensure that whichever level the market hits first automatically cancels the other. For investors in India, combining this logic with a broker’s GTT feature extends exit automation across multi-day delivery holdings. Always set realistic limit buffers around your stop triggers to account for sudden price gaps.

Ready to Build Your Order Strategy?

Learn how market, limit, and stop instructions behave across different trading sessions.


FAQs

1. What is an OCO order in trading?

An OCO (One Cancels the Other) order is a pair of linked conditional orders where the execution of one automatically cancels the other. Traders typically combine a take-profit limit order above the market with a stop-loss order below the market to automate trade exits.

2. How does an OCO order work when prices move quickly?

When the market price reaches either your target trigger or your stop-loss trigger first, the broker sends that leg to the exchange and immediately cancels the remaining leg. However, if prices gap past your limit price during high volatility, the triggered order may remain unfilled until the price returns to your limit range.

3. Can you use an OCO order in delivery trading in India?

Yes, Indian investors can place an OCO order on equity delivery (CNC) holdings by using a broker’s GTT (Good Till Triggered) feature. Because GTT instructions stay active on the broker’s server across multiple trading sessions, you can set both a profit target and a stop-loss for shares held in your demat account.

4. What is the difference between an OCO order and a bracket order?

A bracket order includes three components: an initial entry order, a profit target, and a stop-loss, and it is typically used for intraday trades. An OCO order consists of only two exit legs placed on an existing position without an entry order.

5. Is an OCO order available for Forex trading in India?

Some multi-asset trading platforms support OCO orders on currency derivatives, though retail participation in Forex pairs in India is strictly regulated. You must verify with your SEBI-registered broker which currency contracts and order types are permitted under Indian regulations.


Disclaimer: This article was written with the help of AI and edited by the Monetyra editorial team. It is for educational purposes only and should not be considered financial advice. Trading and investing in financial instruments involve significant risk of loss and are not suitable for all investors. Please consult a licensed financial advisor before making any investment or trading decision.

List of content