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.
    https://ninjatrader.com/support/help...eattribute.htm


    With an addon, you can implement IWorkspacePersistance to save values to xml.
    https://ninjatrader.com/support/help..._interface.htm
    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.
    https://www.google.com/search?q=c%23+save+to+xml
    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.
      https://ninjatrader.com/support/help...eattribute.htm
      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 pezram, 09-28-2022, 11:27 AM
              6 responses
              56 views
              0 likes
              Last Post pezram
              by pezram
               
              Started by daxtrader, Today, 04:23 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Emily  
              Started by llanqui, Yesterday, 10:21 AM
              3 responses
              19 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by FatCanary, 10-03-2022, 07:44 AM
              9 responses
              149 views
              0 likes
              Last Post AndyM
              by AndyM
               
              Started by chandiram2, Yesterday, 11:25 PM
              2 responses
              7 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X