Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Connect Indicator A to an instance of Indicator B on a single chart

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

    Connect Indicator A to an instance of Indicator B on a single chart

    Hi-

    Lets say I have two custom indicators, A and B. I add three B indicators to a chart, each with different params set in the editor. When I add Indicator A, I want to be able to choose from a list one of the three B indicators. The obvious solution is to traverse the Indicators on the ChartControl, but during the construction ChartControl is not available - its null. I then dont know how to provide a selector to choose from a set of B indicators, so that I can set 1 on indicator A. In indicator A I have a property, SelectedB, but to get this to provide a list, I had to make it of type IList<IndicatorB>. When the user selects one in the actual property editor in the chart, I want a single instance to be set.

    Any advice or example indicators that do this I can reference?

    Thanks,

    Nick.

    #2
    Hi Nick, thanks for your note.

    If you want to have the user be able to select one of the three instances you can add an enum list as a property and only instantiate the indicator you need based on what that is set to. See this example of creating an enum selector:



    Please let me know if you have any questions.

    Comment


      #3
      Thanks for the reply Chris. This is not going to work, but thanks for sending it over.

      Nick.

      Comment


        #4
        Hello ptptrader,

        Could you elaborate on how this would not achieve the goal?

        As I understand, Indicator A could add an enum to select Indicator B, and then Indicator B would use a Values Series from Indicator A as input so it calculates from Indicator A. Indicator B would then have to have its plots presented in plots added to Indicator A if you would like to see the data.

        We look forward to assisting.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        368 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X