Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can I add a dynamic second data series?

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

    Can I add a dynamic second data series?

    Lets say I am using 15 min candles for my data series. I have an indicator that I would like to use 5 minute candles for to get more granular. But I want to build the indicator so that whatever the main data series is, my second data series will just take it and divide it by a number like 3. Is this possible?

    #2
    Hello ErikY,

    Yes that is possible. The indicator can use AddDataSeries to add a more granular series. You can then use the BarsInProgress property to separate different parts of your logic.

    To get the primary bar prices you can use the plural close series Closes[0][0] which represents the primary price.

    I look forward to being of further assistance.

    Comment


      #3
      Thanks Jesse.

      Is there a way that I can figure out the main data series value, so that I can simply divide that value by 2 when i do the AddDataSeries?

      So something like this:

      int DSMinutes = MainDataSeries.value;

      AddDataSeries(Data.BarsPeriodType.Minute, DSMinutes/2);

      So what I don't know how to do is get the main data series minutes value, or whatever that type may be, ticks, minutes, seconds, etc.

      Comment


        #4
        Hello ErikY,

        AddDataSeries cannot use runtime variables and cannot be dynamic so you would need to hard code that value.

        I look forward to being of further assistance.

        Comment


          #5
          OK, I was afraid of that. Thanks.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          579 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X