Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO ID Size Constraint

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

    OCO ID Size Constraint

    Hi there

    Is there a formal size constraint on the OCO ID field? I would like to use the field to store data in MessagePack format encoded in Base64. I guess it's broker dependent I'm using FXCM but can't find any info.

    I've written a bettter managed order handler but it loses track of the orders it's managing every time I rebuild or restart Ninjatrader so want to pack data into the OCO ID field so that I can rehydrate the order manager and allow it to continue to manage its orders after a restart or rebuild.

    Thank you

    Kevin

    #2
    Hello Kevin, and thank you for your question. While there are no formal documented limits on OCO IDs in Ninja, strings in C# can generally only have 2^31 characters. This publicly available stack overflow discussion has more information.

    Possible Duplicate: What is the maximum possible length of a .NET string? Is there limit for a C# string to hold data?


    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Ok thanks Jessica. I will try some big values to see how much I can put in - I definitely wouldn't be needing 2 Billion Characters - probably 100bytes. I guess the order gets stored on the brokers database somewhere so I expect it will be constrained in some way.

      Thanks for your response.

      Comment


        #4
        Hey Jessica

        I was able to serialise the data I needed into the field however FXCM didn't return it when I restarted Ninjatrader- I guess it was too long.

        Is there anywhere internal to Ninjatrader that I can store some data?

        Thanks

        Kevin

        Comment


          #5
          I have submitted a feature request to the product management team for the following feature :

          This user would like a user available SQLIte database to be supported out-of-the-box through NinjaScript
          I will follow up with more information as soon as it's available. If the feature requests already exists, a vote will be added to it.


          Please let us know if there are any other ways we can help.
          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            Hello reach4thelasers,

            This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


            SFT-2140


            Please let us know if there is any other way we can help.
            Jessica P.NinjaTrader Customer Service

            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