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

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 algospoke, Yesterday, 06:40 PM
              2 responses
              19 views
              0 likes
              Last Post algospoke  
              Started by ghoul, Today, 06:02 PM
              3 responses
              14 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by jeronymite, 04-12-2024, 04:26 PM
              3 responses
              45 views
              0 likes
              Last Post jeronymite  
              Started by Barry Milan, Yesterday, 10:35 PM
              7 responses
              21 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by AttiM, 02-14-2024, 05:20 PM
              10 responses
              181 views
              0 likes
              Last Post jeronymite  
              Working...
              X