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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        559 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 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
        546 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X