Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default TradingHours for Instrument

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

    Default TradingHours for Instrument

    Hi,

    Is there a way to obtain, via code, what the default TradingHours template would be for an instrument? More specifically, when a new chart is created and an instrument is added via the Data Series properties dialog box, theTrading hours property shows <Use instrument settings>. If you accept this, a chart is created. If you then check the properties of the created chart, the Trading hours is assigned a session template. How does NT determine the session template to implement for the given instrument?

    #2
    Hi Zeos6, thanks for your post.

    There is the TradingHours object you can use:

    https://ninjatrader.com/support/help...adinghours.htm

    There are no methods for finding whatever the default template is.

    Edit: I just asked a colleague and we input a feature request to get the default template for an instrument.
    Last edited by NinjaTrader_ChrisL; 11-22-2019, 12:24 PM.

    Comment


      #3
      Thank you for your response Chris L,but with all due respect, did you actually read my question? The link you provided is irrelevant to this. I simply asked how NT goes from <Use instrument settings> to a specific Trading hours template. Your reply doesn't even come close to addressing this.

      Comment


        #4
        Hi Zeos6, thanks for your reply.

        If there were a method to retrieve the default session template it would be in the Instrument class:


        More often than not the default template will be applied.

        I submitted a feature request to add a method that will let us get the default session template. I'll have a feature tracking ID for your records in a few business days.

        Comment


          #5
          Thank you Chris L. This is actually helpful. We can already get the exchange on which the instrument is traded so it should be possible to retrieve the default session template appropriate to that exchange. Appreciate it.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          655 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          577 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X