Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

code to save and load indicator templates

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

    code to save and load indicator templates

    Hello,

    Can you help me with custom code to save an indicator template to a certain location on my pc from and then to reload templates programatically. I see there is a "SaveInputToXml" method which I guess may be what I am looking for but I do not know how to implement it.

    Thanks

    #2
    Hello b16_aln,

    There is no supported ninjascript method to save something in xml.

    All public variables in indicators and strategies are automatically saved in xml, if they are not using the XmlIgnore attribute.



    With an addon, you can implement IWorkspacePersistance to save values to xml.

    https://ninjatrader.com/support/foru...447#post790447


    For anything else, custom c# must be used and this would be outside of the realm of our support. I would suggest looking into xmlserializerclass.
    Below is a link to a google search.

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello b16_aln,

      All public variables in indicators and strategies are automatically saved in xml, if they are not using the XmlIgnore attribute.

      Thanks, if the public variables are already being saved then there is already code being used to do this. Can you give me some examples of that code in practice relating to saving indicator properties. I have looked through your suggestions and it does not help me. If you know how to do it, because it is already part of the platform to do this, could you not just share the unsupported code with me and save me a week of my time trying to look it up and experimenting which how to do it?

      Thanks

      Comment


        #4
        Hello b16_aln,

        Its internal core code we cannot provide. Unfortunately, this would not be supported for NinjaScript and we would not have any examples that can be used to navigate that path.

        I will submit a feature request on your behalf for the development team to consider supporting this for NinjaScript.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          I don't want a feature request submitted, don't do it on my behalf.

          Comment


            #6
            As NinjaTrader support are unwilling to provide an example of programatically saving and loading indocator templates could any other of the users here possible help me out? Thanks

            Comment


              #7
              Hello b16_aln,

              To clarify, if the Engineering Support team has any unsupported code to provide, we are more than willing to provide it.

              We would not have any examples that can be used to navigate that path at this time.
              Chelsea B.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              666 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              376 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              110 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              575 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              580 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X