Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Second Bars

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

    Second Bars

    Do I take it that one second bars are created from tick data, and if there's no data for a bar, the data series is somehow messed up?

    This code (having added one second bars for BarsInProgress == 2)

    if (Closes[2].Count < 11) {return;}

    Print("Count = "+Closes[2].Count);
    Print("Close = "+Closes[2][10]);

    gives me

    Count = 990833
    **NT** Error on calling 'OnBarUpdate' method for strategy 'Scalp2/717e69258c55485d9e4939cf13150f19': You are accessing an index with a value that is invalid since its out of range.

    #2
    Hi Dave, correct they would be created from tick data - do you have a CurrentBars check for all series in place at the OnBarUpdate() start?

    Comment


      #3
      Hi,

      Thanks, yes, currentbar will sort out that error. The second bars are not much use to me though since they only occur when there are ticks, which is I suppose understandable.

      thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      586 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      341 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
      555 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      552 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X