Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 junkone, Today, 11:37 AM
            0 responses
            2 views
            0 likes
            Last Post junkone
            by junkone
             
            Started by quantismo, 04-17-2024, 05:13 PM
            5 responses
            34 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by proptrade13, Today, 11:06 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Clayton  
            Started by love2code2trade, 04-17-2024, 01:45 PM
            4 responses
            34 views
            0 likes
            Last Post love2code2trade  
            Started by cls71, Today, 04:45 AM
            2 responses
            10 views
            0 likes
            Last Post eDanny
            by eDanny
             
            Working...
            X