Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Saving indicator settings multiple workspaces

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

    Saving indicator settings multiple workspaces

    I have multiple workspaces that use the same custom indicator. How do I save each indicator's settings so that when I open the workspace they maintain the indicator settings?

    #2
    Hello habibalex,

    An indicator with properly serialized inputs will have all parameters saved with the workspace.

    Are you finding that you are setting parameters, saving the workspace, and then after closing and re-opening the workspace the parameters are different?

    Are you asking if indicator settings can be saved with a template to be applied to a new chart?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Are you finding that you are setting parameters, saving the workspace, and then after closing and re-opening the workspace the parameters are different?
      Yes

      These are the in the Properties section, is there a way I can check to make sure they are serialized correctly?

      Code:
      [XmlIgnore]
      		[Display( Name = "Scale", GroupName = "A settings",Description="Colors for bar.")]
              public float Scale{
      			get { return scale;}
      			set{ scale = value;}
      		}
      		
      		[XmlIgnore]
      		[Display( Name = "Use Outline", GroupName = "A settings",Description="Outlines everything.")]
              public bool UseOutline{get;set;}

      Comment


        #4
        I think I needed to see what this was, I kept looking for properties

        Comment


          #5
          Hello habibalex,

          I would expect the Scale float to be saved with the workspace but not the UseOutline bool which has XmlIgnore().

          Workspaces and templates are xml files. If XmlIgnore is used, these values will not be saved.

          May I confirm the Scale float value is not being saved?

          If yes, may I test this on my end?

          To export a NinjaTrader 8 NinjaScript do the following:
          1. Click Tools -> Export -> NinjaScript...
          2. Click the 'add' link -> check the box(es) for the script(s) you want to include
          3. Click the 'Export' button
          4. Enter a unique name for the file in the value for 'File name:'
          5. Choose a save location -> click Save
          6. Click OK to clear the export location message

          By default your exported file will be in the following location:
          • (My) Documents/NinjaTrader 8/bin/Custom/ExportNinjaScript/<export_file_name.zip>


          Below is a link to the help guide on Exporting NinjaScripts.



          The Browseable attribute prevents the input from showing in the Indicator property grid at all. Basically this will hide that input in the parameters window completely when set to false.
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            Hi Chelsea, i just deleted the XMLIgnore statements and everything is saving properly. I have a few more settings that I will test after the market closes today.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sjsj2732, Yesterday, 04:31 AM
            0 responses
            30 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            286 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            282 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            132 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            90 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X