Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"OCO ID can not be reused: Please use a new OCO ID" Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    "OCO ID can not be reused: Please use a new OCO ID" Error


    I'm having a hard time diagnosing this error. In my strategy, my code is:

    if (Position.MarketPosition == MarketPosition.Flat) entryOrder = null;
    if ( (entryOrder == null) && ( (My Setup Condition == true) ) {
    SetStopLoss(CalculationMode.Ticks, 4);
    SetProfitTarget(CalculationMode.Ticks, 4);
    entryOrder = EnterLongLimit(0, false, ...");
    }

    Then, I get into a trade, but the Stops and Profit targets are ignored, and the trade never closes This occurs rarely, and seemingly randomly.


    Any thoughts on this? Thanks for your help,


    Attached Files
    Last edited by timmbbo; 04-27-2021, 10:59 PM.

    #2
    Hello timmbbo,

    Thanks for your post.

    Did you also see a message about the stoploss order being rejected?

    If the stoploss order was rejected that would invalidate the OCO ID and cause the OCO id error.

    You may want to check the "Log" tab of the control center when these errors occur.

    Comment


      #3
      You can also find another solution here: https://ninjatrader.com/support/foru...ort-aa/1101528

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X