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

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
    Paul H.NinjaTrader Customer Service

    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.
        Paul H.NinjaTrader Customer Service

        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).
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Thanks! Look forward to next release!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sidlercom80, 10-28-2023, 08:49 AM
            170 responses
            2,272 views
            0 likes
            Last Post sidlercom80  
            Started by Irukandji, Yesterday, 02:53 AM
            2 responses
            17 views
            0 likes
            Last Post Irukandji  
            Started by adeelshahzad, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post adeelshahzad  
            Started by CortexZenUSA, Today, 12:53 AM
            0 responses
            3 views
            0 likes
            Last Post CortexZenUSA  
            Started by CortexZenUSA, Today, 12:46 AM
            0 responses
            1 view
            0 likes
            Last Post CortexZenUSA  
            Working...
            X