Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

if ( BarsInProgress == 1 ) ...starts 20 mins late

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

    if ( BarsInProgress == 1 ) ...starts 20 mins late

    I have the following code in my cs. Running market reply on 1 min and 1000 vol charts it only starts to print at 9:50:00 AM even though the chart session start is 9:30 AM.

    This only happens on a 6E and CL chart....for YM chart it works perfectly...even though I have recorded all 3 instruments for the same sessions for a week and I am replaying the last day of that week. Why?


    // Add second data series (1 minute Bars object) to pickup Open in a volume chart
    Add(PeriodType.Minute, 1);

    if ( BarsInProgress == 1 )
    Print("BarsInProgress == 1 "+Time);


    I am not using BarsRequired

    #2
    >> I am not using BarsRequired
    Not sure what you mean. BarsRequired is defaulted to 20 no matter if you "use" it or not.

    Comment


      #3
      I do not have the BarsRequired code in the cs. Are you saying that all charts require a min of 20 bars to start to plot?

      Why does the YM chart start from the open of the session instead of 20 1 min bars later like the 6E and CL charts?

      Comment


        #4
        BarsRequired is a property of a strategy and not a chart. It is defaulted to 20 no matter if you reference it in your code or no. You could try setting it e.g. to 0 in the Initialize() method.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by sjsj2732, Yesterday, 04:31 AM
        0 responses
        39 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        289 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        289 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        135 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        96 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X