![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Apr 2007
Location: Longmont, Colorado, USA
Posts: 294
Thanks: 4
Thanked 3 times in 3 posts
|
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 at 10:45 AM.
Reason: Clarify title
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
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"
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Apr 2007
Location: Longmont, Colorado, USA
Posts: 294
Thanks: 4
Thanked 3 times in 3 posts
|
Thanks. I was able to do it by following your instructions.
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Excellent!
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2010
Posts: 106
Thanks: 6
Thanked 1 time in 1 post
|
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. |
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
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/f...ead.php?t=5782
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SAR Parameters | jrs | Charting | 1 | 05-22-2007 04:23 PM |
| user settable input set incorrectly? | Folls | General Programming | 1 | 05-10-2007 09:39 AM |
| Strategy Parameters Negative int value | MindSabre | Strategy Development | 1 | 04-30-2007 01:28 AM |
| Strategy Parameters | Json | Strategy Development | 2 | 04-01-2007 03:38 PM |
| Changing parameters in the Dom | jbfox | Miscellaneous Support | 2 | 12-06-2004 07:30 AM |