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:	133
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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X