Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

FIRST TICK after strategy starts

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

    FIRST TICK after strategy starts

    how do i detect the first tick after the strategy starts?

    #2
    Hello Junkone,

    This is for a NinjaScript strategy.

    You can check if the bar processing is not historical.

    if (!Historical)

    That will return true for the first (and all subsequent) bars after the strategy starts. You could use a bool flag to only check once.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      i found this method.

      protected override void OnStartUp()
      {


      }




      what is the difference between this and that.

      Comment


        #4
        OnStartup() is called only once immediately prior to the start of your script, but after the Initialize() method.

        OnStartup is called before OnBarUpdate(), so does not relate to bar processing or identifying any bar properties.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        19 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        120 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        174 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        92 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        134 views
        0 likes
        Last Post cmoran13  
        Working...
        X