Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries very inconsistant

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

    AddDataSeries very inconsistant

    I am adding 4 additional Daily bars series to a chart for AAPL,MSFT,FB and NFLX. I am using this for each one:
    Code:
    AddDataSeries("MSFT", new BarsPeriod {BarsPeriodType = BarsPeriodType.Day, Value = 1}, 30, "US Equities RTH", true);
    However, sometimes, I use the BarsArray[1].Count method and it only returns 6 while I am expecting 30. To make matters worse, it seems very inconsistent. Sometimes there are 30, other times there are 6. Is this common and if so, what approach can be taken to insure the correct number of bars are loaded into the chart?

    #2
    Hello swcooke,

    Thanks for your post.

    I wanted to clarify, in your indicator are you adding 4 additional data series? (30 daily bars for AAPL,MSFT,FB and NFLX)?

    What is the charts primary series instrument and time frame (and bars to load or days to load)?

    What data feed do you connect to?

    When you apply the indicator, do you see any error messages in the "log" tab of the control center?



    Comment


      #3
      I am adding all four series in State.Configure. The primary instrument is a 5 minute AAPL chart with 5 days of View Period. I am using IQFeed. Please note that AAPL and MSFT both have the correct number of bars while FB and NFLX only have 6. Why do they differ?

      Comment


        #4
        Hello swcooke,

        Thanks for your reply.

        Based on your reply i have tried to recreate and I do not see any issue. Can you provide a simple test script that demonstrates this?

        An alternative would be to use a different AddDataSeries() overload method and change the days to load in the chart to match however many day bars you want loaded.

        Comment


          #5
          I figured out that the issue was, that I was calling BarsArray[1].Count in State.Dataloaded. I misunderstood what was available during that State. The issue was solved by calling in State.Historical. Thanks for your help.

          Comment

          Latest Posts

          Collapse

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