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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        88 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        48 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        31 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        34 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        68 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X