← Back to X_TRADER® Help Library

X_TRADER® Documentation

Order Cancels Order

You are viewing X_TRADER Version 7.17 and higher. For earlier versions, click here

An Order Cancels Order (OCO) order sets two orders of the same quantity for the same contract at different price levels. When one order executes the other order cancels. You can use the OCO order type in MD Trader, the Order Book and the Orders and Fills Window.


  • If using X_TRADER® 7.17.20 or higher, you must be logged in to an available Synthetic SE 7.17.20 or higher in order to place an OCO. If a Synthetic SE is unavailable, the OCO options will be grayed-out.
  • You cannot use OCO's in the Market Window.
  • When you log off of X_TRADER or lose connectivity to a Synthetic SE, the SE server will continue to work your OCO and other synthetic orders.
  • If your OCO gets partially filled, the second order reduces by the quantity filled in the first order.
  • Orders with an End Date/Time action of Go to Market or Market cannot be linked as part of an OCO.

Cursor Changes 

When connecting two orders in an OCO relationship, your cursor turns orange to match the OCO button. In addition, the initials of the order type appear under your cursor: LIM (Limit), SL (Stop Limit), SM (Stop Market).

Strategy Types

When you select OCO from the MD Trading tab, you select the strategy your OCO orders follow. Strategies are designed to accomplish specific goals. For example, a Bracket applied to a current Long position is intended to exit the position at either a profit or a protective stop. Hence both orders must be Sell orders.

  • Bracket: First OCO order is Limit. Second OCO order is Stop Limit or Stop Market. Both orders must be on same side of market. (i.e., 2 Buys or 2 Sells)
  • Breakout: Both OCO orders can be Stop Limit or Stop Market. Both orders must be on opposite sides of market. (i.e., 1 Buy and 1 Sell)
  • Custom: Both OCO orders can be Limit, Stop Limit or Stop Market. No restrictions other than check for invalid price levels by order type.

Order Book/Orders and Fills Window

The Link Type and Link ID columns in the Order Book and Orders and Fills Window will help you identify OCO orders.

  • Link Type shows all orders that are OCOs.
  • Link ID gives the OCO a unique identifier so that you can tell which two orders are linked together.

Synthetic OCO Orders

X_TRADER supports the use of synthetic orders in an OCO order, however this is limited to stop market and stop limit order types. These synthetic order types can be linked with a native order, synthetic stop market order, or synthetic stop limit order. The process of linking synthetic orders as an OCO is the same as linking native orders.


  • Synthetic stop orders that launch other synthetic orders (e.g., stop orders that launch a sliced order) cannot be linked as an OCO.
  • If a synthetic order goes into an unmanaged state, the linked order is canceled.

Placing OCO Orders

To create OCO orders in the Order Book or Orders and Fills Window...

  1. Click to select the first order.
  2. Hold the Ctrl key and click to select the second order.
  3. Right-click and click Link As OCO.

    The orders are given an OCO Link Type and a Link ID. The orders are also color-coded to indicate their OCO relationship.

To create OCO orders in MD Trader...

  1. In MD Properties, enable OCO by clicking the Order Types link in the Order Entry section.
  2. Select the OCO strategy type in the adjacent field: Bracket, Breakout or Custom.
  3. If desired, change the default selections in the Order # Type: fields.
  4. Assign OCO to an order button in theButtons section.
  5. Click OK to save your OCO configuration.
  6. In MD Trader, click the OCO button.

    Notice the button and cursor turn orange and text appears indicating the order type (e.g., LIM).

  7. If you want to assign a different order type, click "SL" or "SM" for Stop Limit and Stop Market order types.
  8. Set the routing and/or customer information.

    Note: You can setup routing rules and customer profiles, or use the <Default> profile. Refer to Creating a Customer Defaults Profile

  9. Set the desired quantity.
  10. Click the Buy or Sell column at the price level where you want to place the first order at.

    The cursor stays orange until the second order is placed.

    Note: To cancel, click the OCO button again before placing the second order.

  11. Click the Buy or Sell column at the price level where you want to place the second order.

Confirming OCO Orders

The Confirm Order window supports OCO orders. When the Display confirmation box on order entry parameter is enabled on the MD Trading properties tab, the Confirm Order window displays immediately after the second leg of the order is submitted. Clicking the Submit or Cancel buttons applies the selected action to both legs of the order.