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
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
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
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:
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 PaulMohn, Today, 03:49 AM
|
0 responses
3 views
0 likes
|
Last Post
by PaulMohn
Today, 03:49 AM
|
||
Started by inanazsocial, Today, 01:15 AM
|
1 response
7 views
0 likes
|
Last Post Today, 02:18 AM | ||
Started by rocketman7, Today, 02:12 AM
|
0 responses
10 views
0 likes
|
Last Post
by rocketman7
Today, 02:12 AM
|
||
Started by dustydbayer, Today, 01:59 AM
|
0 responses
2 views
0 likes
|
Last Post
by dustydbayer
Today, 01:59 AM
|
||
Started by trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
23 views
0 likes
|
Last Post Today, 12:32 AM |
Comment