This is a feature that has been asked for numerous times since NT7, and should be easy to add since the interval selector obviously already handles the change, and just needs to be properly exposed to us with a BarPeriod input.
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
Need method to set interval programmatically
Collapse
X
-
Need method to set interval programmatically
There needs to be a simple method to change the chart interval programmatically, for example by passing a BarPeriod object. Using SendKeys generally does not work per (https://ninjatrader.com/support/foru...ad.php?t=81953), and even if that did work, it does not provide a means to set a custom interval.
This is a feature that has been asked for numerous times since NT7, and should be easy to add since the interval selector obviously already handles the change, and just needs to be properly exposed to us with a BarPeriod input.Tags: None
-
Hello aslane,
Thanks for your inquiry.
The feature request ticket ID is SFT-1085. It has not yet been fulfilled, so I will submit a vote on your behalf for a supported way to programmatically change a chart's instrument/interval.
Upon fulfillment feature requests will be noted in the help guide when a release of NinjaTrader contains the implementation. Release notes can be found here: https://ninjatrader.com/support/help...ease_notes.htm
In the meantime, you may wish to investigate Chelsea's RolloverIndications indicator to experiment with a way to do this through unsupported code. The button press to rollover starts at line 138.
His script can be found here: https://ninjatrader.com/support/foru...atid=7&lpage=1
Please let us know if we can be of further assistance.JimNinjaTrader Customer Service
-
Thank you, that code reference is very helpful.
Also, while it is not documented, it seems that setting the Interval on the IntervalSelector to any period value seems to work (including custom bar types). Not sure if there are any unknown side affects, but so far seems to work. YMMV. If that was properly tested/documented that would meet the requirements for setting the interval.
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
20 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
21 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment