Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

adding a new parameter to an indicator

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

    adding a new parameter to an indicator

    Kind of noob question I guess.
    I searched the forum before posting, not extensively though

    I would like to know how to add a new parameter to an indicator, after generating it with the wizard.
    I cannot plan all parameters from the start, and I want to know how to change parameters in the process of indicator's creation.

    I tried to add a new parameter like myInput1, and I did a getter and setter for it like myInput0.
    It appeared in the Misc section area of Indicator's properties.

    Is this the way to go? Or is it possible to add a new parameter exactly like myInput0? (To be displayed in Parameters section of Indicator's properties). Because I would like new parameters to appear in parameters section of the indicator.

    #2
    Hi mishhh,

    For this, please take a look at this sample - http://www.ninjatrader.com/support/f...ead.php?t=5782
    TimNinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply.
      Category field was what I needed.

      I've looked around but sorry I've missed tips and tricks section.

      Comment


        #4
        Hi mishhh,

        Additionally, add the following line can add more discretion to the naming and organizing of parameters.

        [Gui.Design.DisplayNameAttribute("Name displayed in settings")]
        TimNinjaTrader Customer Service

        Comment


          #5
          It could be very useful.
          Still category parameter it's sufficient for me for the moment.
          But it's good to know how to display a different name.

          Thanks

          Comment


            #6
            adding a new parameter to an indicator

            I have just posted a similar question. It would appear that I did not use the correct "key words" to find this when I searched the forum on previous occasions.
            Tim certainly gave a good reply.
            Now, where is the last bit of script to be inserted into the overall code.
            Thank you from oldhiker

            Comment


              #7
              oldhiker, have you already checked into Tim's second reply here in this thread? It would show how to add input parameters to a script and contains sample code.

              Comment


                #8
                adding a new parameter to an indicator

                Yes, I got the long reply and I have used it successfully.
                Where in the script is the following line supposed to go:-
                [Gui.Design.DisplayNameAttribute("Name displayed in settings")]
                Thank you .
                One other unrelated question. Is there a unique ID for each thread, so that people could easily return to the thread at some later date?

                Comment


                  #9
                  This line would go in your Properties region and be applied for each property needed where you would like to change this attribute - as an example :

                  [Description("Numbers of bars used for calculations")]
                  [GridCategory("Parameters")]
                  [Gui.Design.DisplayNameAttribute("MyCustomParameter ")]
                  public int Period
                  {
                  get { return period; }
                  set { period = Math.Max(1, value); }
                  }

                  Comment


                    #10
                    Originally posted by oldhiker View Post
                    Is there a unique ID for each thread, so that people could easily return to the thread at some later date?
                    You can bookmark this url here - http://www.ninjatrader.com/support/f...d.php?p=265982

                    Comment


                      #11
                      Yes, that now makes the quest complete. Thanks for the info.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      579 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      334 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      101 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      554 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      551 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X