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.
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        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 inanazsocial, Today, 01:15 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_Jason  
                Started by rocketman7, Today, 02:12 AM
                0 responses
                6 views
                0 likes
                Last Post rocketman7  
                Started by dustydbayer, Today, 01:59 AM
                0 responses
                1 view
                0 likes
                Last Post dustydbayer  
                Started by trilliantrader, 04-18-2024, 08:16 AM
                5 responses
                22 views
                0 likes
                Last Post trilliantrader  
                Started by Davidtowleii, Today, 12:15 AM
                0 responses
                3 views
                0 likes
                Last Post Davidtowleii  
                Working...
                X