TradeReign
Back to HomeEducation HubCompatibilityAboutDisclosures
NinjaTrader Desktop

Manual OCO Orders in NinjaTrader Link and Verify Two Orders

OCO means one cancels the other. You can use a manual OCO pair to link a stop and target for a position that already exists. An ATM template sets up its own linked exits when a new entry fills. The example below uses an existing one-contract position in simulation.

Quick Answer

In NinjaTrader Desktop Chart Trader, right-click the order-entry panel and enable OCO Order. Submit both orders for the same account and contract, then turn OCO mode off. In Control Center → Orders, check that both orders share the same OCO ID. After one fills or is cancelled, verify the state of the other order.

Start 7-Day TrialMore Guides

A linked stop and target on synthetic MES candles

Synthetic MES 1-minute candles. Times are bar closes in ET.

The dashed lines mark a synthetic MES stop at 5,997.50 and target at 6,004.00. If the one-contract target fills, check that the position is flat and the paired stop is cancelled. The candle only shows that price reached the target.

Same OCO ID

Use the Orders grid to verify which two orders were linked.

Check order state

Confirm that the sibling reaches Cancelled after the completed exit.

Check position size

If an order rejects, confirm which exits are still working and what quantity remains open.

Place a manual OCO exit pair in Chart Trader

Use a simulation account and an existing one-contract MES long for this drill. Verify the account, exact contract, and quantity in Chart Trader and in Positions. Use a practice position without working exits. With ATM Strategy set to None, the panel submits manual orders.

Assume a simulated entry at 6,000.00 and a current market between 5,997.50 and 6,004.00. Right-click within the Chart Trader panel and select OCO Order. The OC label indicates that the mode is active. On the chart, submit one Sell Stop Market at 5,997.50 and one Sell Limit at 6,004.00 for the same simulated contract. Adapt the levels to the current simulated quote when practicing.

If the first order fills or is rejected before you have submitted the second, stop and recheck the position and orders before submitting the second leg.

Once the pair is placed, turn OCO Order off in the panel. In Control Center → Orders, show the OCO column if it is hidden. Confirm a matching OCO identifier, the sell side, a quantity of one on each exit, and working or accepted status as appropriate for the order and connection.

Verify a fill or cancellation in Orders

If the target fills for one contract, check the execution and wait for the stop to show Cancelled. Then check Positions for zero remaining contracts. Run a separate simulated trial for the stop leg if you want to verify the reverse outcome. A touch on a chart alone does not establish a fill or cancellation.

Cancelling either order in the pair can cancel the other even when the position stays open. Before rebuilding a bracket, verify the account position and both order states. If part of a multi-contract order filled, check the remaining position and working quantities directly. The one-contract example avoids partial-quantity assumptions.

What to check when NinjaTrader says an OCO ID cannot be reused

Read the rejection details in Orders or Log. An order that fills, cancels, or rejects can end the current OCO grouping. NinjaTrader also resets the ID after two orders with that ID have been placed. A replacement placed after the group ends may be rejected or receive a different ID.

Confirm which of the original orders still exist. On a simulated account, turn OCO mode off and start a fresh pair only after you have checked current exits and position size. Verify the new pair in Orders. For live incidents, confirm the actual orders and position with your broker before submitting replacements.

Check whether the OCO sibling is still working after a disconnect

The resting orders and the rule that cancels a sibling can run in different places. NinjaTrader documents that accepted or working Rithmic orders can remain with the brokerage, exchange, or provider servers, while the PC handles OCO cancellation. For Continuum and CQG, NinjaTrader says the provider handles most OCO cancellation on its servers. Verify the exact connection and order type in use.

Suppose both sell exits were accepted for a one-contract MES long on a locally managed OCO connection. While Desktop is disconnected, the profit target fills. Afterward, the broker shows a flat position and the original sell stop is still working. The matching OCO ID records how the orders were linked. The active stop is a separate order to reconcile with the broker before submitting any replacement. Depending on the order and account, a later sell fill could open a short position.

Use the broker’s connected order and position views or contact its trade desk if Desktop’s status is stale. Check the execution, remaining position, and exact state of both exit orders. Record Unknown as unresolved until you have broker confirmation. If you rehearse the sequence on a simulation account, verify hosting separately for any live connection you use.

NinjaTrader® is a registered trademark of NinjaTrader Group, LLC. No NinjaTrader company has any affiliation with the owner, developer, or provider of the products or services described on this website, or any interest, ownership, or otherwise, in any such product or service, and no NinjaTrader company endorses, recommends, or approves any such product or service.

Sources

Official References

Platform details on this page were checked against these official resources.

NinjaTrader Desktop Chart Trader OCOEnabling the pair, turning the mode off, and when NinjaTrader resets OCO IDs.NinjaTrader Desktop Orders tabOCO identifier, fill, remaining quantity, and order-state columns.NinjaTrader order and OCO hosting by connectionWhere resting orders and OCO cancellation logic are handled.
Related Guides

Keep Building the Rule System

Trace a rejected NinjaTrader order

Read the first Log error and verify which exit orders remain active.

Set up attached NinjaTrader ATM exits

Let a new entry create both brackets and check the remaining quantity after a target fills.

Confirm your NinjaTrader simulation account

Identify Sim101 or broker Demo before any practice order.

Check NinjaTrader market-data and routing status

Match your disconnect time to the provider’s incident and verify orders separately.

FAQ

Common Questions

What is the difference between NinjaTrader OCO and ATM?

OCO links orders so a fill or cancellation can cancel the sibling. A NinjaTrader ATM template can create linked stop and target orders after an entry fills and apply additional exit management.

How can I see if two NinjaTrader orders are linked?

In NinjaTrader Desktop Control Center, open Orders and look at the OCO identifier for both orders. Check the account, contract, side, and quantity as well.

Can I reuse an OCO ID after one order is cancelled?

Create a fresh group after checking the old orders and position. NinjaTrader resets the OCO identifier after order events such as a fill, cancellation, or rejection.

Risk Disclosure

Futures trading contains substantial risk and is not suitable for every investor. TradeReign is a trading-discipline and rule-enforcement application. It does not provide trading advice, trade signals, investment recommendations, or performance guarantees.

TradeReign is not a broker-dealer, futures commission merchant, or investment advisor.

Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital - money that can be lost without jeopardizing financial security or lifestyle - should be used for trading. Past performance is not necessarily indicative of future results.