PDA

View Full Version : Increase number of New Indicator Input Parameters???


higler
05-24-2007, 10:44 AM
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.

NinjaTrader_Ray
05-24-2007, 10:56 AM
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"

higler
05-24-2007, 11:56 AM
Thanks. I was able to do it by following your instructions.

NinjaTrader_Ray
05-24-2007, 12:39 PM
Excellent!

DaveE
10-12-2011, 02:26 PM
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.

NinjaTrader_RyanM
10-12-2011, 04:13 PM
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:
http://www.ninjatrader.com/support/forum/showthread.php?t=5782