Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO group tag mismatch

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

    OCO group tag mismatch

    About 5 % of the time the OCO group tags are not identical which leaves an open order after one of the pair is triggered. The error come from GetAtmStrategyUniqueId() being different at the time of OCO group creation in an unmanaged strategy. Any thoughts on this?
    Regards

    #2
    Hello elliot5,

    As this involves NinjaScript coding, this has been moved to the NinjaTrader 8 Strategy Development section the forums.

    Are you saving the string id to a variable and using the variable for both orders?

    Or are you calling this multiple times for each order to generate different strings?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      yes I am saving the string id to a variable "oco" which I then add to other unique bools and variable to create the oco string. Regards

      Comment


        #4
        Hello elliot5,

        Are you saving the complete ID to a variable? Not part of it, the full complete Id. Is it saved and exactly the same for both orders?

        Please provide print output to confirm.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          No I am only saving the GetAtmStrategyUniqueId() as a variable - then attaching it to other unique strings for each discrete execution. Regards and thanks

          Comment


            #6
            Hello elliot5,

            OCO is one cancels others. When two orders are using the same OCO ID these are tied with OCO. If the OCO IDs are different then those orders are not tied with OCO.

            Save the full ID to a variable, use this for all orders you want in the OCO grouping.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            580 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            336 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            554 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X