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

Session end time

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

    Session end time

    Hi,

    What is the best practice for handling session end time when trading session is reduced due to holidays or the like (e.g. Dec-24th)?

    For example, RTH session for a given instrument would always return 4pm even though in reality session ends at 2pm.

    What's the best way to handle such case in strategies?

    Thank you

    #2
    Originally posted by alex.nt View Post
    Hi,

    What is the best practice for handling session end time when trading session is reduced due to holidays or the like (e.g. Dec-24th)?

    For example, RTH session for a given instrument would always return 4pm even though in reality session ends at 2pm.

    What's the best way to handle such case in strategies?

    Thank you

    The instrument settings do not allow for setting different sessions for holidays. If you want to treat holidays in a different way, then you need to hardcode this in your indicator or strategy.

    For example for ES early closes are on Dr Martin Luther King Day, President's Day, Memorial Day, Independece Day, Labour Day, Thanksgiving, Christmas Eve. If you want to conduct a backtest over five years, write down the dates for those 7 days with an early close. Copy those dates into a DateTime array and check for those dates within your strategy.

    I think that NinjaTrader 8 will have a holiday calendar, which allows to set specific holiday sessions, but NinjaTrader 7 does not have it. So you need to code it manually for each instrument that you want to trade.

    Comment


      #3
      JC, could you confirm about NinjaTrader 8?

      Comment


        #4
        Hello alex.nt,

        I cannot confirm anything about NinjaTrader 8 until closer to the beta release as it is still subject to change, but we are looking at changing the way Session Templates are handled to account for items like this. So there is a good change that there would be an easier way to accommodate this without custom coding.
        JCNinjaTrader Customer Service

        Comment


          #5
          Thank you, JC, for the information. Harry, thank you too, I appreciate your complete answer.

          I feel somewhat behind the news

          JC, may I participate in alpha version testing? Or in beta testing?

          Comment


            #6
            Originally posted by alex.nt View Post
            Hi,

            What is the best practice for handling session end time when trading session is reduced due to holidays or the like (e.g. Dec-24th)?

            For example, RTH session for a given instrument would always return 4pm even though in reality session ends at 2pm.

            What's the best way to handle such case in strategies?

            Thank you
            A while back, I had the same question. I found a thread where @kdoren has coded a method to handle this. You might want to take a look.

            ref: http://www.ninjatrader.com/support/f...d.php?p=140164

            Comment


              #7
              You could have also have a look at this indicator package:



              The indicators all allow for setting holiday dates. For those dates full session high, low and floor pivots will be calculated from double day sessions for Globex instruments - in line with contract specifications.

              A similar method can be used to check for the early close.

              Basically the missing part of the master instrument data (holiday settings) is added via the indicator.

              Comment


                #8
                Hello alex.net,

                You may send an email to support[at]ninjatrader[dot]com with a subject line of 'Attn Matthew' and in the body of the email you may request to be put on our list for the beta of NT8 so we will have your email added to a list to update you when this is announced.
                JCNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by KennyK, 05-29-2017, 02:02 AM
                2 responses
                1,278 views
                0 likes
                Last Post marcus2300  
                Started by fernandobr, Today, 09:11 AM
                0 responses
                0 views
                0 likes
                Last Post fernandobr  
                Started by itrader46, Today, 09:04 AM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by timmbbo, Today, 08:59 AM
                0 responses
                2 views
                0 likes
                Last Post timmbbo
                by timmbbo
                 
                Started by bmartz, 03-12-2024, 06:12 AM
                5 responses
                33 views
                0 likes
                Last Post NinjaTrader_Zachary  
                Working...
                X