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 CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            387 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            255 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            215 views
            1 like
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            300 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            264 views
            0 likes
            Last Post CarlTrading  
            Working...
            X