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

Determine if session is shortened (equities RTH) on daily time frame

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

    Determine if session is shortened (equities RTH) on daily time frame

    Hi. I'm using this way:

    bool isFullLengthSession = Time[0].Hour >= 16; // ET time zone

    It works well to capture all shortened sessions from 2015 onward, but fails 2014 and back. For example Christmas eve 2015 session shows correctly as having ended at 13:00 ET, but Christmas eve 2014 shows incorrectly as having ended at 16:00. It appears there are incorrect server definitions for the years prior to 2015. How else to detect a shortened session (on daily time frame)? Thanks.

    #2
    Hello digibob,

    Thank you for the post.

    You may want to check the control center -> tools -> trading hours and make sure you have holidays configured for Christmas for the data you have. In my current install I see back to 2015 in the holidays listed so that may be what you are seeing.

    Also an item to look into is using the session iterator, if you have logic that deals with the session information this can help. https://ninjatrader.com/support/help...essioniterator


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse, thanks for the quick reply. Yes, it is as you say, the holidays are configured back to 2015. Does it mean I have to add earlier dates manually one by one? Is there no way to download these definitions?

      About session iterator, I'm familiar with it as I've used it before on intraday time frame and for some reason I was under the impression it could not be used on daily, but looking at the doc page you linked there is no mention of that, then I will give it a try. Thanks. Just to make sure, it relies on the same holiday definitions, right?

      Comment


        #4
        Hello digibob,

        Correct if the definition does not go back as far as your data does you would need to update the database to reflect what you have.

        I took a look through our internal notes but I don't see anything specific toward daily series and the SessionIterator, and that should account for holidays as well.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks, Jesse. Kind regards.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GussJ, 03-04-2020, 03:11 PM
          11 responses
          3,227 views
          0 likes
          Last Post xiinteractive  
          Started by andrewtrades, Today, 04:57 PM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by chbruno, Today, 04:10 PM
          0 responses
          7 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by josh18955, 03-25-2023, 11:16 AM
          6 responses
          440 views
          0 likes
          Last Post Delerium  
          Started by FAQtrader, Today, 03:35 PM
          0 responses
          12 views
          0 likes
          Last Post FAQtrader  
          Working...
          X