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

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.
    Chris L.NinjaTrader Customer Service

    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.
        Chris L.NinjaTrader Customer Service

        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 Barry Milan, Yesterday, 10:35 PM
          5 responses
          16 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          11 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          8 views
          0 likes
          Last Post nandhumca  
          Working...
          X