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:	28
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:	22
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:	23
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.
    JesseNinjaTrader Customer Service

    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 raysinred, 04-06-2025, 01:52 PM
      16 responses
      139 views
      0 likes
      Last Post raysinred  
      Started by iantriestrading, Yesterday, 01:39 PM
      5 responses
      28 views
      0 likes
      Last Post iantriestrading  
      Started by trendisyourfriend, 05-25-2023, 09:54 AM
      10 responses
      169 views
      0 likes
      Last Post Curerious  
      Started by iantriestrading, Today, 04:12 PM
      0 responses
      17 views
      0 likes
      Last Post iantriestrading  
      Started by Adamel, Today, 03:47 PM
      0 responses
      13 views
      0 likes
      Last Post Adamel
      by Adamel
       
      Working...
      X