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