• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Multiple Input Selectors in Property Grid

  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    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.
    Last edited by NinjaTrader_Jesse; 02-21-2020, 03:40 PM. Reason: add feature tracking id
    JesseNinjaTrader Customer Service


    Latest Posts


    Topics Statistics Last Post
    Started by nikolaalx, Today, 07:31 AM
    2 responses
    Last Post bltdavid  
    Started by HiddenPhilosopher, Today, 09:28 AM
    0 responses
    Last Post HiddenPhilosopher  
    Started by tipslark, Today, 07:23 AM
    0 responses
    Last Post tipslark  
    Started by Grantx, Today, 06:49 AM
    0 responses
    Last Post Grantx
    by Grantx
    Started by muhuzekob, Today, 05:59 AM
    0 responses
    Last Post muhuzekob