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 aussugardefender, Today, 01:07 AM
              0 responses
              3 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              238 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Started by oviejo, Today, 12:28 AM
              0 responses
              4 views
              0 likes
              Last Post oviejo
              by oviejo
               
              Started by pechtri, 06-22-2023, 02:31 AM
              10 responses
              125 views
              0 likes
              Last Post Leeroy_Jenkins  
              Working...
              X