On a related note, can you provide a link to all available controls that can be added by Indicator developers? I could not find it. Thanks,
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!
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
NinjaTrader
Multiple Input Selectors in Property Grid
Collapse
X
-
Multiple Input Selectors in Property Grid
I see how to add controls to the Property Grid for strings, ints, Brushes, etc. Is there any way to add an Input selector among my Indicator controls so that I could select other Indicators as Inputs to my Indicator? And then possibly use their values in my Indicator as Inputs[0][0] or Inputs[1][0]? Not sure if that is how it works or not.
On a related note, can you provide a link to all available controls that can be added by Indicator developers? I could not find it. Thanks,Last edited by swcooke; 02-18-2020, 05:38 PM.Tags: None
-
Hello swcooke,
This is a little long however this will give a more complete answer to your question.
To start, your indicator will already have an input override created for you so it should be able to have an input selected by default. If you are applying it in a chart you will see the Input field which you can select an input. In code you have a second overload generated to where you can pass input: MyIndicator(Series input, other params)
The other general way of approaching this would be to use an enum. We have a sample which does what you asked or toggle between indicators input. That relies on having other properties like Period defined and passed to the selected indicator. This is the generally supported way to do what you are asking: https://ninjatrader.com/support/help...ned_parame.htm
To expand on what you asked, you can take a look into using an input selector however the selected indicator would not be ready to use and would not be the same as calling the indicator through code. You may be able to use the selection from the input to gather details and then call an indicator in a normal way such as SMA(variableForPeriod). This is not something I have tested to confirm it works, if you feel you need extra inputs and wanted to try this you could take a look at the script attached to this post: https://ninjatrader.com/support/foru...e-an-indicator
Regarding a link to controls, the only documented controls are the addon controls which are located here: https://ninjatrader.com/support/help...8/controls.htm
Other items like you are describing which are property editors and type converters are not specifically documented. Most of that information is held on the forums here or can be found in existing NinjaScript files. Unfortunately there is not one resource that I can provide on this topic. For a general list of some of those items you can use visual studio to find all and search for TypeConverter or PropertyEditor to see how those are being used throughout the NinjaScript files. I will put in a feature request for documenting a list of properties, this can be tracked using id: SFT-4659.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Mestor, 03-10-2023, 01:50 AM
|
13 responses
313 views
0 likes
|
Last Post Today, 07:29 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
7 responses
24 views
0 likes
|
Last Post Today, 07:25 AM | ||
Started by martini, Yesterday, 04:45 PM
|
2 responses
13 views
0 likes
|
Last Post
by martini
Today, 07:23 AM
|
||
Started by cre8able, 03-24-2024, 09:30 AM
|
2 responses
18 views
0 likes
|
Last Post
by cre8able
Today, 07:23 AM
|
||
Started by Adam Klaus, Yesterday, 08:21 PM
|
1 response
8 views
0 likes
|
Last Post Today, 07:18 AM |
Comment