Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to get session's end hour without SessionIterator

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

    how to get session's end hour without SessionIterator

    is there a way to get exactly the end of day hour without creating SessionIterator ?

    #2
    Maybe by reading the XML file corresponding to your desired trading hours template in...
    C:\Users\Username\Documents\NinjaTrader 8\templates\TradingHours\

    Comment


      #3
      Maybe I should have said that I need it inside the Strategy code. and the problem is to account for summer time changes... (I am not trading in USA time zone )

      Comment


        #4
        You can read the XML file within your code but you need to create the function to do it but why not use the SessionIterator ? or you could also use a plain text file and enter the end of the day for a year and read it using ninjascript commands.

        Check this video which explains how to use the sessionIterator:


        Last edited by trendisyourfriend; 07-22-2023, 09:01 AM.

        Comment


          #5
          Hello dadarara,

          Thanks for your post.

          SessionIterator should be used in your script to get the ActualSessionEnd.

          ActualSessionEnd return the session's end date and end time converted to the user's configured Time Zone.

          See the help guide documentation below for more information.

          SessionIterator: https://ninjatrader.com/support/help...oniterator.htm
          ActualSessionEnd: https://ninjatrader.com/support/help...sessionend.htm
          <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Today, 05:17 AM
          0 responses
          39 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          124 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          64 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          41 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          46 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X