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

Increase number of New Indicator Input Parameters???

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

    Increase number of New Indicator Input Parameters???

    I have an indicator that uses the values of various other indicators to determine its own value. I would like to use the Input Parameters to pass some values to the "internally called" indicators because the parameters may need to vary depending on the instrument or time frame to which it is applied. I would also like to use the Input Parameters to set some internal "defining limits" to my indicator. Currently, we seem to be limited to 4 input parameters, which is not sufficient for this particular indicator so I have had to "hard code" some values into the indicator. This works but I have to have a number of different versions of this indicator instead of just being able to modify 8 input parameters. My concern is that since the Input Parameters end up being incorporated into the NinjaScript generated code, which we're to neither change nor remove, that I am afraid to try and "manually" add any. Believe me, I don't want to go there and really hose things up.

    Do you think that in the future that we might have the option in the "New Indicator" wizard of adding more than 4 input parameters (maybe a control that we can click on that says "More Input Parameters" so that we can add more than 4)? Or maybe I'm missing another way to be able to specify and pass parameters into the indicator for calculations and decision making. Thanks.
    Last edited by higler; 05-24-2007, 10:45 AM. Reason: Clarify title

    #2
    Thanks for the suggestion. This is something that we have on our list for future enhancement consideration.

    For now, you do have to manually do it... Don't be afraid!!

    Lets say you have an input already defined that you added through the wizard named "Period".

    There are two items that make up this input programmatically.

    - A variable declared under the variables section (private int period = 7; // for example)
    - A property under the properties section

    * Note that the internal variable will be a lower case "p" where the property will use an uppercase "P" for "Period".

    So, to create an additional input, create a new variable, lets called it nextPeriod, then copy the code for the "Period" property, and change its name to "NextPeriod" and change the variable it references from "period" to "nextPeriod"
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks. I was able to do it by following your instructions.

      Comment


        #4
        Excellent!
        RayNinjaTrader Customer Service

        Comment


          #5
          Hello NT support,

          Ray said in 2007 "this is something that we have on our list for future enhancement consideration."
          Can I ask for this to be put back on the list (in case it fell off the end).
          A fixed arbitrary limit of 4 parameters is clunky. C# does not have a limit, so I assume there's no real limit in NT. The wizard page could start with just one row in a scrolling list, whenever user hits "Add another parameter" button another row is added to the list.

          Comment


            #6
            DaveE,

            We appreciate your feedback and have assigned this feature request ID #1330 in our tracking system. You're right that there is no real NT limit, and the following post can help you add these by code:
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by cre8able, Today, 03:20 PM
            1 response
            9 views
            0 likes
            Last Post cre8able  
            Started by fiddich, Today, 05:25 PM
            0 responses
            3 views
            0 likes
            Last Post fiddich
            by fiddich
             
            Started by gemify, 11-11-2022, 11:52 AM
            6 responses
            804 views
            2 likes
            Last Post ultls
            by ultls
             
            Started by ScottWalsh, Today, 04:52 PM
            0 responses
            4 views
            0 likes
            Last Post ScottWalsh  
            Started by ScottWalsh, Today, 04:29 PM
            0 responses
            9 views
            0 likes
            Last Post ScottWalsh  
            Working...
            X