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!
See more
See less

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 usazencort, Today, 01:16 AM
    0 responses
    1 view
    0 likes
    Last Post usazencort  
    Started by kaywai, 09-01-2023, 08:44 PM
    5 responses
    603 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by xiinteractive, 04-09-2024, 08:08 AM
    6 responses
    22 views
    0 likes
    Last Post xiinteractive  
    Started by Pattontje, Yesterday, 02:10 PM
    2 responses
    21 views
    0 likes
    Last Post Pattontje  
    Started by flybuzz, 04-21-2024, 04:07 PM
    17 responses
    230 views
    0 likes
    Last Post TradingLoss  
    Working...
    X