Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting Yesterday's ES RTH High and Low

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

    Getting Yesterday's ES RTH High and Low

    I wrote a script to calculate the average ES RTH Daily Range by adding a secondary data series.

    Code:
    AddDataSeries(null, new BarsPeriod{ BarsPeriodType = BarsPeriodType.Minute, Value = 450}, "US Equities RTH");
    . Intended for 9:30am to 5:00pm.

    And I calculate the daily range by
    Code:
    if (BarsInProgress == 1) {
        _dayRange[0] = Highs[1][0] - Lows[1][0];
    }


    I am able to get most of the daily ranges correctly, but there are just some days with incorrect values. for example, holidays and fomc days. Why and how can I fix this?

    For example: The FOMC day on the left should have a daily range of 73.75pts but the scripts from above calculates it as 71.75pts.
    Click image for larger version

Name:	image.png
Views:	349
Size:	116.8 KB
ID:	1279394

    #2
    Hello dwrety,

    Try using 1440 for the number of minutes for a daily bar.

    Print the bar time, high and low to see if these are corresponding with the data on the chart.
    https://ninjatrader.com/support/foru...121#post791121

    Just to confirm, you have not modified the 'US Equities RTH' trading hours template have you? This should still be showing the holidays in the Trading Hours window.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello dwrety,

      Try using 1440 for the number of minutes for a daily bar.

      Print the bar time, high and low to see if these are corresponding with the data on the chart.
      https://ninjatrader.com/support/foru...121#post791121

      Just to confirm, you have not modified the 'US Equities RTH' trading hours template have you? This should still be showing the holidays in the Trading Hours window.
      Thank you Chelsea. Yes, I have changed the RTH hour templates and I tried both the original and the modified. The results were the same. Now I simply switched to an alternative method, which is to use PriorHOLC values and it's correct now. I am just curious why the results are off.

      Comment

      Latest Posts

      Collapse

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