Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A method to call the first tick of a new session in a tick by tick Strategy ?

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

    A method to call the first tick of a new session in a tick by tick Strategy ?

    There's a "FirstTickOfBar" for regular charts which works ok. I wish a method like that but for a Chart or Strategy that go tick by tick, because it's obvious in this kind of timeframe, it'll be always "FirstTickOfBar" = True. I'm trying to set flags and other things that don't work quite well. Any suggestion would be highly appreciated.

    Thanks

    #2
    Hello pstrusi,

    Thanks for your post.

    You can use Bars.FirstBarOfSession to detect when the session begins: https://ninjatrader.com/support/help...rofsession.htm

    You can then combine them to detect the first tick of the first bar of the session.

    if (Bars.FirstBarOfSession && FirstTickOfBar)
    {
    // do something
    }

    Comment


      #3
      I don't know why I didn't remember this method.
      Thank you very much Paul.

      Comment

      Latest Posts

      Collapse

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