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
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.JesseNinjaTrader Customer Service
-
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.JesseNinjaTrader Customer Service
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.
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by PaulMohn, Today, 06:59 PM
|
0 responses
4 views
0 likes
|
Last Post
by PaulMohn
Today, 06:59 PM
|
||
Started by bortz, 11-06-2023, 08:04 AM
|
48 responses
1,747 views
0 likes
|
Last Post
by carnitron
Today, 06:57 PM
|
||
Started by Jonker, 04-27-2024, 01:19 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 05:45 PM | ||
Started by businessman1929, 04-29-2024, 01:28 PM
|
2 responses
22 views
0 likes
|
Last Post Today, 05:38 PM | ||
Started by bltdavid, 03-27-2023, 05:32 AM
|
18 responses
347 views
0 likes
|
Last Post
by ETFVoyageur
Today, 05:28 PM
|
Comment