Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
indicator tab
Collapse
X
-
indicator tab
I have an indicator that creates a buttons in the chart trader that runs in a single with 4 and 5 Range tabs. The problem is that when I go to the 5 Range tab the buttons will overlap in the chart trader. Can someone share some tips or code that can help on the tab issue of the indicator? Something that if I chose 4 Range tab, the 5 Range dispose of first the buttons created by the 5 Range in the chart trader then insert the buttons from the 4 Range not the other way around.Tags: None
-
Hello luxurious_04,
Do you see the same problem with the sample listed in the following post?
If the problem happens when switching tabs it may be that part of the logic to observe the active tab is not happening correctly, generally the indicator should remove the controls when it is not on the active tab in all situations.
Hello All, Moving forward this will be maintained in the help guide reference samples and no longer maintained on the forum. Creating Chart WPF (UI) Modifications from an Indicator - https://ninjatrader.com/support/help...ui)-modifi.htm (https://ninjatrader.com/support/helpGuides/nt8/creating-chart-wpf-(ui)-modifi.htm) I've
I look forward to being of further assistance.
- Likes 1
-
How about adding more buttons to that lower grid, for example, 2 more buttons? Or even add another grid that will hold 2 more buttons?
Comment
-
Hello luxurious_04,
This is all demonstrated in the ChartTraderCustomButtons example in the linked thread from post #2.
Please see the CreateWPFControls method and InsertWPFControls method. A grid called lowerButtonsGrid is created, and rows are added to that grid, and then the buttons are added to that grid. Then in InsterWPFControls, lowerButtonsGrid is added to the script's chartTraderGrid (which is captured from ChartWindowChartTraderControl.)
Please let us know if you have any additional questions.
- Likes 1
Comment
-
Yes I saw that lowerButtonGrid has 2 buttons how about add 4 buttons to that Grid? It will be a total of 6 buttons.
Comment
-
Hello luxurious_04,
Yes you could add more buttons if you wanted however that is beyond the scope of that sample. I had linked that because your question did not involve adding buttons but tab switching, you can use that to determine where your original problem is stemming from. If you have other questions about that sample or adding buttons i would suggest making a new thread for that specifically, we can continue troubleshooting whats going on with the tab switching here to close out your original question.
If you are adding more buttons and then seeing a problem we would need to know what you tried before we would be able to help. You would need to use the same guidelines shown in that sample to extend it if you want more buttons or any other changes. The concepts being used in that sample are not NinjaTrader specific but are WPF concepts. To learn more about positioning in WPF you could refer to external C#/WPF/Xaml tutorials surrounding using Grids and Columns/Rows in grids.
Please let us know if you have any additional questions.
Comment
-
Honestly, I have tried adding another grid just like the lowerButtonGrid and added buttons. The problem is that when I switch back to the other tab then the buttons will be gone. Same indicator running in 2 tabs.Originally posted by NinjaTrader_Jesse View PostHello luxurious_04,
Yes you could add more buttons if you wanted however that is beyond the scope of that sample. I had linked that because your question did not involve adding buttons but tab switching, you can use that to determine where your original problem is stemming from. If you have other questions about that sample or adding buttons i would suggest making a new thread for that specifically, we can continue troubleshooting whats going on with the tab switching here to close out your original question.
If you are adding more buttons and then seeing a problem we would need to know what you tried before we would be able to help. You would need to use the same guidelines shown in that sample to extend it if you want more buttons or any other changes. The concepts being used in that sample are not NinjaTrader specific but are WPF concepts. To learn more about positioning in WPF you could refer to external C#/WPF/Xaml tutorials surrounding using Grids and Columns/Rows in grids.
Please let us know if you have any additional questions.
Comment
-
Hello luxurious_04,
Without knowing what you did specifically it would be a guess on why that happened, likely the grid was not added correctly or is not correctly being removed in the removal logic. For adding more buttons to the lower grid you can just utilize the existing grid the sample shows to add more rows for more buttons.
The key points to modifying it would be using the addedRow2 and then adding more Height to that to account for more buttons. The next steps would be adding more rows to that grid for your other buttons and assigning the buttons to the given rows/columns just like the existing two buttons. The lowerButtonGrid does not have any rows currently so you would have to add two new rowDefinitions to that grid if you wanted to split the content into two rows.
The sample is designed in a specific way which uses loops and an array of buttons which makes it hard to see what needs modified. I would likely suggest to just try and learn the general WPF grid concepts from that sample and design your own code using hard coded variables/ less loops to avoid confusions.
To answer your original question, you likely need to reverse the changes you made and remove that custom grid. Use the existing lowerButtonsGrid and addedRow2 to continue adding more buttons in that area.
Please let us know if you have any additional questions.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
601 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 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
559 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
558 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment