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
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!
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
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.Chris L.NinjaTrader Customer Service
-
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.Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Barry Milan, Yesterday, 10:35 PM
|
5 responses
16 views
0 likes
|
Last Post Today, 05:37 PM | ||
Started by DanielSanMartin, Yesterday, 02:37 PM
|
2 responses
13 views
0 likes
|
Last Post Today, 05:26 PM | ||
Started by DJ888, 04-16-2024, 06:09 PM
|
4 responses
12 views
0 likes
|
Last Post
by DJ888
Today, 04:28 PM
|
||
Started by terofs, Today, 04:18 PM
|
0 responses
11 views
0 likes
|
Last Post
by terofs
Today, 04:18 PM
|
||
Started by nandhumca, Today, 03:41 PM
|
0 responses
8 views
0 likes
|
Last Post
by nandhumca
Today, 03:41 PM
|
Comment