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?
    BertrandNinjaTrader Customer Service

    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 cre8able, Yesterday, 09:15 PM
      2 responses
      14 views
      0 likes
      Last Post cre8able  
      Started by Trader146, Today, 09:17 PM
      0 responses
      6 views
      0 likes
      Last Post Trader146  
      Started by ttrader23, 05-08-2024, 09:04 AM
      9 responses
      43 views
      0 likes
      Last Post ttrader23  
      Started by ZeroKuhl, Yesterday, 04:31 PM
      8 responses
      46 views
      0 likes
      Last Post ZeroKuhl  
      Started by reynoldsn, Today, 07:04 PM
      0 responses
      11 views
      0 likes
      Last Post reynoldsn  
      Working...
      X