Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How can I place a button in the bar menu?
Collapse
X
-
Hello _Roman,
For an example of adding a button, please see this link:
Trader Control - How to reset my code when user clicks on the Chart Tabs - NinjaTrader Support ForumGeneral platform technical support for NinjaTrader 8.
You can also find some examples of creating custom toolbars and adding panels in the following link:
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.
-
Thank you. I need some time to try this metod for resolve the problem. I will definitely update you on the results of the question. Thank You so Much.Originally posted by NinjaTrader_Jesse View PostI look forward to being of further assistance.
Dear NinjaTrader_Jesse.
I need track mouse pointer, and do some command on mouse click and double click. How can I do this? Thank you.
How can I expand the menu with my commands by right-clicking mouse. Thank you so much.
Comment
-
Hello _Roman,
Mouse and keyboard actions are going to be a more difficult subject depending on what you are trying to do as there are already a lot of existing mouse and keyboard actions which will get in the way. It is possible to use the Preview mouse events in some situations, however this is not a NinjaScript concept, this is a WPF C# concept. Can you detail more on what you need to do with the mouse input?
Can you also detail what you are trying to right click on to expand a menu, is this the button you are adding or the chart? For GUI questions, you will generally need to be very specific when asking these type of questions as there are many ways to customize the GUI.
I look forward to being of further assistance.
Comment
-
I am write same indicator to show Foot Print and Profile. To calculate Profile I need draw rectangle. I can draw rectangle from Start point, when I double click to Chart. After then, I can finish draw the Rectangle and still Rectangle on same place. Then Second point is a click on chart, the Rectangle still freeze. For this Action I need track mouse coordinates, and handle events mousemove and mouse DoubleClick and Click. Can you help me to resolve this trouble?
The indicator have any parametеrs. I want change setings in the floating menu(Right button mouse down), and in toolbar menu. In toolbar menu I want to do same names with command menu to change needs parameters.
Thank You very Much.Last edited by _Roman; 04-11-2019, 01:29 PM.
Comment
-
Hello _Roman,
For this use case, I would not suggest an indicator but would suggest a drawing tool as that has mouse handling built in for its anchors. You could see the existing rectangle tools code if you wanted to expand on that tool. This would be my only suggestion if you need mouse input as there is nothing documented for this type of mouse use for other types like Indicators. You can experiment with the WPF mouse and keyboard events along with handling the events, however, this is not a subject which I can assist with. You can learn more about mouse and keyboard events in relation to WPF controls by searching online for "C# WPF mouse or keyboard events".
For the indicator parameters, I would suggest looking at the DrawingToolTile indicator for some examples of creating a floating window for parameters. You can also explore the WPF topic of using "ContextMenuOpening" to dynamically append context menu items. The ChartControl has a context menu, this is a WPF context menu so you can append items or do other actions during its opening event if you wanted. This is another subject you can research online in contrast to general C# and WPF but would not be something we have documented specifically for NinjaScript.
I look forward to being of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
594 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 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
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
554 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment