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

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.
            Chris L.NinjaTrader Customer Service

            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.
                Chris L.NinjaTrader Customer Service

                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.
                  Chris L.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by BarzTrading, Today, 07:25 AM
                  2 responses
                  23 views
                  1 like
                  Last Post BarzTrading  
                  Started by devatechnologies, 04-14-2024, 02:58 PM
                  3 responses
                  20 views
                  0 likes
                  Last Post NinjaTrader_BrandonH  
                  Started by tkaboris, Today, 08:01 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post tkaboris  
                  Started by EB Worx, 04-04-2023, 02:34 AM
                  7 responses
                  163 views
                  0 likes
                  Last Post VFI26
                  by VFI26
                   
                  Started by Mizzouman1, Today, 07:35 AM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X