Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to prevent loading indicator on Chart loaded with multiple dataseries

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

    How to prevent loading indicator on Chart loaded with multiple dataseries

    Hi,

    Is there a way to detect that a chart has been loaded with more than one dataseries, either on the same panel or multiple panel?

    Reason is I want to control my indicator to be only used on a single selected data Series in the chart (e.g .the lowest time frame) and do not allow user to be able to apply the indicator to the other data series.

    Is there a way to make this work?

    Thanks
    Ystan79

    #2
    Hello ystan79, thanks for writing in.

    You can loop through the BarsArray object of ChartControl to get the BarsPeriod Value. e.g.

    else if(State == State.DataLoaded)
    {
    System.Collections.ObjectModel.ObservableCollectio n<ChartBars> myChartBars = ChartControl.BarsArray;
    foreach(ChartBars bars in myChartBars)
    {
    Print(bars.Bars.BarsPeriod);
    }
    }

    With this, you can also check the indicator's Bars.BarsPeriod to see if it is using the smallest series on the chart.

    The Indicator will use the Input Series setting from the Indicators setup window.

    Please let me know if I can assist any further.

    Comment


      #3
      Hi Chris,

      Thank you very much for your inputs . It helps and works for me.

      Just a couple more questions;

      You mentioned

      "With this, you can also check the indicator's Bars.BarsPeriod to see if it is using the smallest series on the chart.

      The Indicator will use the Input Series setting from the Indicators setup window."

      Does this means I can control the Input Series selection from the Indicators Properties window from within my script? (e.g Change the "Input Series" field from within my indicator to the one desired upon detecting multiple data series in chart)

      If yes can you share the code to do so?

      Also just curious, is it possible for an indicator to "remove itself" from a Dataseries? E.g. I am looking into removing the additional indicators from the "Configured" window list applied on the dataseries other than the desired ones and to do this from within the script. Is this possible? If yes can you share the code to do so too?

      Many thanks
      ystan79
      Last edited by ystan79; 11-07-2020, 05:57 PM.

      Comment


        #4
        Hello ystan79, thanks for your reply.

        The Input Series can not be changed through the script. It can only be adjusted through the user interface. There is no way to remove any indicators from the configured list other than the user interface.

        Please let me know if I can assist any further.

        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
        369 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