Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Break at EOD on Secondary Data Series?

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

    Break at EOD on Secondary Data Series?

    Hi,

    I want Click image for larger version

Name:	image.png
Views:	95
Size:	1.2 KB
ID:	1338248on my secondary data series.

    If I load a four hour data series on my primary,
    it will not match my secondary with:


    AddDataSeries(null, new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 240 }, 5, null, true); // 4 Hourly (BarsInProgress == 1)
    ​I've tried
    AddDataSeries(null, new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 240 }, 5, null, false); // 4 Hourly (BarsInProgress == 1)

    Click image for larger version

Name:	image.png
Views:	78
Size:	32.3 KB
ID:	1338250

    at the moment the only way I can get my primary and secondary to match is to turn off Break at EOD on the primary, but I don't want that.
    Click image for larger version

Name:	image.png
Views:	79
Size:	32.7 KB
ID:	1338251


    I want to turn it on on my secondary. And yes, I will be using a different primary data series. I'm just using the primary for debugging for matching at the moment.

    Any advice much appreciated.

    Thanks!
    Attached Files

    #2
    Hello davydhnz,

    To specify the break at eod you would need to use true/false for the isResetOnNewTradingDay, false meaning it will not break at the eod.

    isResetOnNewTradingDay

    A nullable bool determining if the Bars object should Break at EOD. Will accept true, false or null as the input. If null is used, the data series will use the settings of the primary data series.​

    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.

    Comment


      #3
      I found the bug, it was how (IsFirstTickOfBar) was triggering not according to the (BarsInProgress == 1)

      Anyway, thank you for your reply.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      556 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
      545 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