• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:
    http://www.ninjatrader-support.com/v...ead.php?t=5782

    To add the parameters you work in the properties region, not the NinjaScript generated code section.
    Ryan MNinjaTrader 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:
        http://www.ninjatrader.com/support/f...ead.php?t=4770
        Ryan MNinjaTrader 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:
          http://www.ninjatrader-support.com/v...ead.php?t=5782

          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:
            http://ninjatrader.com/support/forum...84&postcount=1
            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:
              http://ninjatrader.com/support/forum...84&postcount=1
              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 jimjoe123, Today, 09:28 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post jimjoe123  
                  Started by tgn55, Today, 08:57 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post tgn55
                  by tgn55
                   
                  Started by chartish, Today, 04:43 PM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_EricB  
                  Started by Trader17, Today, 04:07 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Trader17  
                  Started by GussJ, Today, 01:30 PM
                  2 responses
                  20 views
                  0 likes
                  Last Post GussJ
                  by GussJ
                   
                  Working...
                  X