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?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Default TradingHours for Instrument
Collapse
X
-
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?Tags: None
-
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.
-
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
-
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
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
650 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment