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

Changed indicator settings not saved with chart

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

    Changed indicator settings not saved with chart

    Hi,

    I just finished working on a new indicator. It works fine, but any changes made to the default settings in the indicator window aren't saved with the chart. I've never run across this before; and don't know what is causing it. Is there some flag that can to be set to ensure that changes are saved?

    Thanks-

    #2
    Hello palinuro,

    Thanks for the post. Can you please clarify "changes made to the default settings"? Does this mean you are right clicking > Save as Default or just setting values for user defined inputs?

    What are you expecting to see on the chart? Updated parameters when you change user defined inputs?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by palinuro View Post
      Hi,

      I just finished working on a new indicator. It works fine, but any changes made to the default settings in the indicator window aren't saved with the chart. I've never run across this before; and don't know what is causing it. Is there some flag that can to be set to ensure that changes are saved?

      Thanks-
      Any inputs that are not serializable, if changed from the defaults, will not be saved with the indicator, unless you make your own arrangements to serialize such.

      Comment


        #4
        Thanks for the quick responses.

        I've serialized the colors; the others are just integers.

        By 'changes made to the default settings' I mean both:
        - changing the values for the chart, but they revert to the original values when I reopen the chart, and
        - right clicking for Save as Default. They aren't.
        Neither works.

        Perhaps also relevant: every variable is visible in the indicator's signature, not just the ones in the "Parameters" GridCategory (i.e., including colors etc.). (I've noticed this with some other indicators I've downloaded from other sites, too.)

        Comment


          #5
          Thanks for the reply. Do you have a code snippet or a file we could use to see this here?
          Ryan M.NinjaTrader Customer Service

          Comment


            #6
            I found the culprit while looking for a code snippet to send - while copying and pasting I had forgotten to delete "XMLIgnore" in the Properties section.

            Thanks for the response!

            Comment


              #7
              Great you were able to spot it. Thanks for follow up here, palinuro.
              Ryan M.NinjaTrader Customer Service

              Comment


                #8
                Actually I now have a follow-up question:
                Every variable is now also included in the signature for the indicator. Is there a way to prevent that?

                Comment


                  #9
                  The method signature is generated based on user defined inputs. There is no way to have a variable function as an input, yet not be part of the method signature.
                  Ryan M.NinjaTrader Customer Service

                  Comment


                    #10
                    palinuro

                    By signature I assume you mean EMA(High,Period,etc)?

                    if so try

                    Code:
                    	public override string ToString()
                    		{
                    		return "";
                    		}

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Rapine Heihei, 04-23-2024, 07:51 PM
                    2 responses
                    30 views
                    0 likes
                    Last Post Max238
                    by Max238
                     
                    Started by Shansen, 08-30-2019, 10:18 PM
                    24 responses
                    942 views
                    0 likes
                    Last Post spwizard  
                    Started by Max238, Today, 01:28 AM
                    0 responses
                    9 views
                    0 likes
                    Last Post Max238
                    by Max238
                     
                    Started by rocketman7, Today, 01:00 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post rocketman7  
                    Started by wzgy0920, 04-20-2024, 06:09 PM
                    2 responses
                    28 views
                    0 likes
                    Last Post wzgy0920  
                    Working...
                    X