• 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.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Input Selectors in Property Grid

Collapse
X
 
  • 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.

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jameslee001, Today, 08:09 AM
    0 responses
    2 views
    0 likes
    Last Post jameslee001  
    Started by bertochi, Today, 07:25 AM
    1 response
    2 views
    0 likes
    Last Post bertochi  
    Started by Kentoes, Today, 07:06 AM
    0 responses
    0 views
    0 likes
    Last Post Kentoes
    by Kentoes
     
    Started by third monkey, Today, 06:33 AM
    0 responses
    1 view
    0 likes
    Last Post third monkey  
    Started by xfbrq, Today, 05:41 AM
    0 responses
    3 views
    0 likes
    Last Post xfbrq
    by xfbrq
     
    Working...
    X