Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceSession vs BarsSinceNewTradingDay

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

    BarsSinceSession vs BarsSinceNewTradingDay

    Hi,

    NT8 has BarsSinceNewTradingDay versus NT7's BarsSinceSession. Are they the same?

    How can I get BarsSinceSession in NT8? I don't want to count bars elapsed from a new trading day but a new session.

    Thanks,
    Joseph

    #2
    Hello josephktcheung,

    Thanks for your post.

    BarsSinceSession in NT7 has been renamed to BarsSinceNewTradingDay in NT8. Here is the definition: The number of bars that have elapsed since the start of the trading day. Here is a link to the NT8 helpguide section: http://ninjatrader.com/support/helpG...tradingday.htm

    For your reference, when you are unsure, check the code breaking section and seach via the NT7 method or name and it will identify what replaces: http://ninjatrader.com/support/helpG...ng_changes.htm

    Please see attached.
    Attached Files

    Comment


      #3
      Thanks Paul, what I want to do is to start the strategy 2 seconds after session opens. Currently I use sessionIterator to get the session ActualSessionBegin, check if current time is 2 seconds after ActualSessionBegin and if yes start trading.

      Would BarsSinceTradingDay works the same if I set the bar type to seconds and make sure it is greater than 2 before trading? Or would this only work for morning session?

      Comment


        #4
        Hello josephktcheung,

        Thanks for your reply.

        In theory that would be correct and certainly works like that in NT7 however in testing NT8 this morning I am seeing an inconsistency that I need to investigate. I will update this thread when i have further information.

        Comment


          #5
          Hello josephktcheung,

          Just to update you, we determined that there was a bug with BarsSinceNewTradingDay. In my tests it was inconsistently reporting the bars. The bug was assigned to the tracking number of NT8-9859 which has since been fixed and will be available in the next beta release (11).

          Comment


            #6
            Thanks! Look forward to next release!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            149 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            84 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            129 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            125 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            102 views
            0 likes
            Last Post CarlTrading  
            Working...
            X