I'm adding IntervalSelector to chart's menu from indicator. Is there any way to customize the dropdown items? For instance remove Range or Tick intervals.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Customize IntervalSelector dropdown items
Collapse
X
-
-
Hello serialbug, and thank you for your question.
The following answer will apply to NinjaTrader 8.
The functionality we have documented for IntervalSelector guides you through linking to the selector and hooking events to it. As of yet we do not have more granular support for modifying the IntervalSelector programmatically.
If you would like to investigate on your own, the object returned by
may have children or editable properties.Code:[FONT=Courier New]// http://ninjatrader.com/support/helpGuides/nt8/en-us/?intervalselector.htm[/FONT] [FONT=Courier New] LogicalTreeHelper.FindLogicalNode(pageContent, "intervalSelector")[/FONT]
The instructions for creating entirely new add-on windows and tabs found here will be invaluable.
I recommend using those instructions to create an entirely new tab, then finding out how to populate the new tab with the existing intervals. I believe doing so will make you familiar with the XAML and all of the exposed capabilities.
We are happy to help with any questions that come up along the way. If you discover any ways to modify the existing interval selector using the document model object the above code exposes, I would like to encourage you to share it with other users here on the forums.Jessica P.NinjaTrader Customer Service
-
Thanks NinjaTrader_JessicaP,
I used the link you provide to build new empty addon window, it works fine, but when I add IntervalSelector to my xaml layout I got the the exception XamlParseException: Cannot find resource named 'BackgroundTextInput'
My page content:
Any suggestions? Thanks!Code:<t:NTTabPage x:Class="WpfControlLibrary2.sbMyAddOnPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:t="clr-namespace:NinjaTrader.Gui.Tools;assembly=NinjaTrader.Gui" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <DockPanel> <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal"> <t:IntervalSelector x:Name="intervalSelector" IntervalChanged="OnIntervalChanged"> <t:IntervalSelector.Margin> <Thickness Left="{StaticResource MarginBase}" Top="{StaticResource PaddingColumn}" Bottom="0"/> </t:IntervalSelector.Margin> </t:IntervalSelector> </StackPanel> </DockPanel> </t:NTTabPage>Last edited by serialbug; 10-03-2016, 07:59 AM.
Comment
-
While it does look like the BackgroundTextInput symbol is indeed defined in the NinjaTrader.Gui.dll assembly, it looks like there is some added prep work that needs to be done through the NinjaScript C# code for IntervalSelector to work. It is very likely that there are some object references that must be created in memory before you will be able to use an IntervalSelector.
I am including a help guide documentation which contains both a C# and XAML code sample for IntervalSelector. Please ensure that, prior to calling IntervalSelector through either C# or XAML, that you fully understand and include every preparation step that is taken through the documented sample code.
Jessica P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
581 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
336 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment