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 NullPointStrategies, Today, 05:17 AM
      0 responses
      53 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X