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 Tim-c, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            2 views
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,772 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            31 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            945 views
            0 likes
            Last Post spwizard  
            Working...
            X