Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

to get One current day on bar close

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

    to get One current day on bar close

    I try to get data by 1 min on bar.close.
    And to set parameters "Days to load" = 0, "End date" = current day ("Data Series" window).
    example window:
    Click image for larger version

Name:	example.png
Views:	130
Size:	47.1 KB
ID:	1137678
    but it writes to the file for two days: current and before.
    Q: How to get data by minutes on the bar.close only the current day?
    ps I have read this post: https://ninjatrader.com/support/foru...rrent-day-only
    but I need 1 minute on bar close and only the current day.
    Thanks in advance.

    #2
    Hello minds2010,

    Thank you for the post.

    If you had used 0 bars to load that will load 1 session day. With the NQ that would include yesterday because its session spans overnight. If you only wanted the bars from today, matching your current PC clock day, you would need to use logic to do that instead of relying on session information.

    The following would be one way to check if the bar being processed has a date of today:
    Code:
    if(Time[0].Date == NinjaTrader.Core.Globals.Now.Date)

    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse.
      Good job.
      Very Big Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      116 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      61 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      40 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      82 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X