Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CalculateOnBarClose = false + Check For New Bar

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

    CalculateOnBarClose = false + Check For New Bar

    Hi,

    I'm using a strategy based on a daily timeframe with the COBC property set to false. At the start of a new day I want to set some variables to default state.

    How do I check for a new day? I don't think Bars.FirstBarOfSession works with daily and COBC = false right?

    #2
    Hello Siroki,

    Thank you for your note.

    You can use FirstTickOfBar if you are running COBC = false
    This will become true when a new bar or day is formed.

    if(FirstTickOfBar)
    {
    // do action here
    }
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Cal!

      Comment

      Latest Posts

      Collapse

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