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

Access to indicator property editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Access to indicator property editor

    Hello,

    I'm trying to create an indicator that takes two other indicators as input. The problem I'm running into is it seems that the IndicatorInputEditor and InputConverter classes are needed to make it work (with the Editor and TypeConverter attributes) but they are both internal.

    Is it possible to make those two public?


    Thanks,
    Wil

    #2
    Hello,

    Thank you for the question I will be happy to assist you.

    Can you please clarify what you are trying to do I want to make sure I understood the question correctly?

    This is how I have understood your question:

    You have 3 indicators, we will call them A B and C.

    You want to create indicator A so that it takes indicator B and C as inputs.

    Is A taking the input from these two in the sense that you apply Indicator A to a chart and it gets data from B and C?

    Or is this in a strategy where you are adding indicator A in the initialize with the overloads as values from B and C?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for your reply.

      An example:

      AverageIndicator - Takes two indicators and average their values to come up with its value.

      Properties:
      • Input ("Input series" in the chart). This is the first series/indicator. You can select an indicator/price value from the editor for this property
      • SecondSource. This is a DataSeries or IDataSeries property that is the second series/indicator. It does not have the same editor as Input - there is no editor. It seems to get the editor, this property needs the Editor and TypeConverter attributes with IndicatorInputEditor and InputConverter respectively as parameters.

      Hopefully this is a bit more clear. Basically, how to add an IDataSeries property that has the same editor as the Input property that lets you select other indicators?

      Thanks.

      Comment


        #4
        Hello,

        Thank you for the clarification.

        For adding an extra input box to an script I don't believe there is any supported method to add that specific input list.

        I believe for what you are trying to do it would be best to create your own list with only acceptable indicators listed in it so that the user cant select non compatible indicators.

        You could create your own public enum, this would allow you to create a input as a drop down list with items of your choosing, the input for this list could then be used in a switch/case statement to change the logic in your script to whatever indicators are defined

        If this would be of use to you please let me know If you need assistance with making a enum I could provide an example.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Vietanhnguyen2hotmailcom, Yesterday, 10:29 AM
        4 responses
        23 views
        0 likes
        Last Post Vietanhnguyen2hotmailcom  
        Started by PhillT, 04-19-2024, 02:16 PM
        4 responses
        35 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Started by ageeholdings, 05-01-2024, 05:22 AM
        5 responses
        37 views
        0 likes
        Last Post ageeholdings  
        Started by reynoldsn, Today, 02:34 PM
        0 responses
        13 views
        0 likes
        Last Post reynoldsn  
        Started by nightstalker, Today, 02:05 PM
        0 responses
        23 views
        0 likes
        Last Post nightstalker  
        Working...
        X