Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to create Indicator with more than 4 parameters

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

    How to create Indicator with more than 4 parameters

    Hello!

    I'm using NT 7 RC1.
    Tried to create new Indicator using Indicator Wizard with 6-7 parameters.
    Indicator Wizard allowed create only 4 parameters ( It has only 4 fields to fill out) .
    How I could incorporate more than those 4 parameters?

    Should I go into script and modify appropriate areas, including restricted area:

    #region NinjaScript generated code. Neither change nor remove.

    Thanks
    YB

    #2
    Hello byi777,

    Welcome to the NinjaTrader forums!

    You can add additional parameters with code. The structure for this is covered in this forum post:


    To add the parameters you work in the properties region, not the NinjaScript generated code section.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank you, Ryan,
      It worked well and generate proper code in restricted area.

      Only one minor issue - parameters were placed in generated code and in Indicator properties in alphabetical order - I would like to have it in the same order I've placed them in “Variables” and/or “Properties” section.
      Could I control this order or just have some prefixes to parameters names,which will create alphabetical order matching order I would like to have.

      Thanks
      YB

      Comment


        #4
        Yes, you can control the order of parameters. This forum post can help:
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Add more than 4 parameters to indicator

          Originally posted by NinjaTrader_RyanM1 View Post
          Hello byi777,

          Welcome to the NinjaTrader forums!

          You can add additional parameters with code. The structure for this is covered in this forum post:


          To add the parameters you work in the properties region, not the NinjaScript generated code section.
          Hi, am trying to add more than 4 parameters for an indicator. Have tried the suggested link which is broken. While I can add the parameters in the code and it compiles, only 4 display. How do I fix this?

          Comment


            #6
            Hello,
            Thank you for the post.
            Please see this forum post for adding additional parameters to your indicator:

            If questions come up or if we may be of any further assistance, please let us know.

            Comment


              #7
              Originally posted by NinjaTrader_ChrisL View Post
              Hello,
              Thank you for the post.
              Please see this forum post for adding additional parameters to your indicator:

              If questions come up or if we may be of any further assistance, please let us know.
              Hi Chris. I can add the parameters, have lots of coding experience. The problem is the new parameters do not show in the display window of the indicator when I add it to the chart. In fact only the ones created with the initial indicator creation setup do.

              So, added new parameters, compiled the code, add the indicator to chart, can't see extra added parameters. Do you know what I'm missing?

              Thanks.

              Comment


                #8
                Hello,
                Thank you for the reply.
                Please send me your code file to*platformsupport[at]ninjatrader[dot]com.*
                You can do this by going to the Control Center-> Help-> Mail to Platform Support.
                Please reference the following in the email body:*"ATTN ChrisL http://ninjatrader.com/support/forum/showthread.php?t=35560"

                I look forward to assisting further.

                Comment


                  #9
                  Hello,
                  Thank you for your patience.
                  Your 'IsEnabled' was named 'Enabled' in your properties region. The private bool variable is called 'isEnabled' so you will need to change 'Enabled' on line 123 to 'IsEnabled'.
                  You need to change line 56. You are using your UI parameter name instead of the private variable so change 'Enabled' to 'isEnabled' on line 56.
                  Please let me know if I may be of any further assistance.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  576 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
                  553 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