NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-24-2007, 10:44 AM   #1
higler
Senior Member
 
Join Date: Apr 2007
Location: Longmont, Colorado, USA
Posts: 294
Thanks: 4
Thanked 3 times in 3 posts
Default 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 at 10:45 AM. Reason: Clarify title
higler is offline  
Reply With Quote
Old 05-24-2007, 10:56 AM   #2
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

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"
NinjaTrader_Ray is offline  
Reply With Quote
Old 05-24-2007, 11:56 AM   #3
higler
Senior Member
 
Join Date: Apr 2007
Location: Longmont, Colorado, USA
Posts: 294
Thanks: 4
Thanked 3 times in 3 posts
Default

Thanks. I was able to do it by following your instructions.
higler is offline  
Reply With Quote
Old 05-24-2007, 12:39 PM   #4
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Excellent!
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-12-2011, 02:26 PM   #5
DaveE
Senior Member
 
Join Date: Mar 2010
Posts: 106
Thanks: 6
Thanked 1 time in 1 post
Default

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.
DaveE is offline  
Reply With Quote
Old 10-12-2011, 04:13 PM   #6
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

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
NinjaTrader_RyanM is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 02:32 AM.