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 mjairg, 07-20-2023, 11:57 PM
            3 responses
            213 views
            1 like
            Last Post PaulMohn  
            Started by TheWhiteDragon, 01-21-2019, 12:44 PM
            4 responses
            544 views
            0 likes
            Last Post PaulMohn  
            Started by GLFX005, Today, 03:23 AM
            0 responses
            3 views
            0 likes
            Last Post GLFX005
            by GLFX005
             
            Started by XXtrader, Yesterday, 11:30 PM
            2 responses
            12 views
            0 likes
            Last Post XXtrader  
            Started by Waxavi, Today, 02:10 AM
            0 responses
            7 views
            0 likes
            Last Post Waxavi
            by Waxavi
             
            Working...
            X