Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

saving user variables in workspace

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

    saving user variables in workspace

    Support,

    In an indicator, if one wants the user input variable(like bool,color,double,..etc) to be saved,how should one define it in properties section of the code? So, that when the chart is saved in a workspace and when NT is restarted,it shows up with the same user input values.

    How about if it needs to be saved in the "chart template" as well? So,that if another chat is created with the same template, it has same user input values (input values like Color,double,bool.,..etc)

    Is there any sample code showing this?

    --
    Shooter

    #2
    Shooter, for example for user defined colors, proper serialization is needed in your custom code - http://www.ninjatrader-support2.com/...ead.php?t=4977
    Last edited by NinjaTrader_Bertrand; 08-14-2009, 03:18 AM.

    Comment


      #3
      Thanks Bertrand for the Color serialization. Is there anything similar which explains how to do it for user inputs like Bool,double variables?

      --
      Shooter

      Comment


        #4
        For user input paramters, please check into this tip - http://www.ninjatrader-support2.com/...ead.php?t=5782

        Comment


          #5
          Thanks for the link Bertrand. It explains on creating user input parameters. But it doesn't mention anything on how to serialize double/bool variables.

          I tried creating some bool variables as "parameters" in the same way the link describes(but the link describes int variables) ,but they are not getting saved in workspace or template.

          Do, bool and double variables need to be serialized like Colors?

          --
          Shooter

          Comment


            #6
            They do not need to be serialized.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks Josh. So, only type of variables that needs to be serialized are Color. Other variables need not be serialized for storing in templates/workspace.

              Like double,bool etc,..for them to be stored in workspace/template, should be only defined under "Parameters" category or any other user defined category is fine?

              --
              Shooter

              Comment


                #8
                Generally speaking that is correct.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                61 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                40 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                21 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                23 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                51 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X