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 DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
6 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
41 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
Comment