Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

First Tick of Session

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

    First Tick of Session

    Hello,

    Is there any way to know when the first tick of a new session comes into OnBarUpdate?

    Similar to FirstTickofBar() but for a session?

    ?

    #2
    Hello TurtleTrader,

    Thank you for your note.

    You would need to use FirstTickOfBar in conjunction with Bars.FirstBarOfSession

    http://www.ninjatrader.com/support/h...rofsession.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      another queston

      Hi Cal, thank you...are these values available for historical data when a chart first loads?

      Or just for live stream data?

      Comment


        #4
        TurtleTrader,

        The FirstTickOfBar will get called for each bar historically, so if you add in the Bars. FirstBarOfSession then it will only be true when the actual first bar of the session is in play.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          OK

          OK, so then the Bars. FirstBarOfSession is only true for live, streaming data?

          (i.e. not historical data, say on the chart load or refresh?

          Comment


            #6
            TurtleTrader,

            That's not what I said.

            Both will historically but there is a limitation to the FirstTickOfBar.

            Since we don't have the realtime data for backtest, FirstTickOfBar is true for each bar call. In realtime, this will work as expected.

            Bars.FirstBarOfSession will work in both Historical and Real time stream
            Cal H.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            3 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            238 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            384 views
            1 like
            Last Post Gavini
            by Gavini
             
            Started by oviejo, Today, 12:28 AM
            0 responses
            4 views
            0 likes
            Last Post oviejo
            by oviejo
             
            Started by pechtri, 06-22-2023, 02:31 AM
            10 responses
            125 views
            0 likes
            Last Post Leeroy_Jenkins  
            Working...
            X