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 bortz, 11-06-2023, 08:04 AM
        47 responses
        1,602 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        8 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        4 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        12 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X