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 CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      61 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      34 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      198 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      364 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      283 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X