ChartControl.ContextMenuOpening ChartControl.ContextMenuClosing
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
Feature Request: DrawingTool needs to allow context menu access
Collapse
X
-
Feature Request: DrawingTool needs to allow context menu access
The DrawingTool API needs to add something similar to:
Code:Tags: None
-
Hello aslane,
If you are wanting to add something to the context menu of all charts, you would need to do so from an addon.
In the addon there is an OnWindowCreated and OnWindowDestroyed that is triggerd any time a window, such as a chart, is opened or closed.
OnWindowCreated() - http://ninjatrader.com/support/helpG...dowcreated.htm
OnWindowDestroyed() - http://ninjatrader.com/support/helpG...wdestroyed.htm
Below is a link to a forum thread where NinjaTrader_Jesse has posted an example of adding to a charts context menu.
Chelsea B.NinjaTrader Customer Service
-
Yes, I am aware that I can add via a AddOn, but that does not address the issue in original post. The idea is not to add something to all menus all the time, the issue is adding very drawing specific items when a drawing is selected, and only when selected. This allows the user to directly interact with the drawing, i.e. select a specific template, or set a specific option.
Comment
-
Hello aslane,
Once the drawing tool is added to the chart, there are methods that will trigger than you can use to trigger the code that adds to the context menu on the chart.
As a suggestion, tnstead of triggering the code that adds to the context menu in OnWindowCreated(), trigger this in the drawing tools OnStateChange.
It would not be possible to add to the context menu of a chart when the chart opens if the code is in the drawing tool. If the drawing tools is not active, it won't trigger. If you are wanting to detect when a chart opens, you would have to do this in an Addon and not in a drawing tool.Chelsea B.NinjaTrader Customer Service
Comment
-
I know you are trying to help, but none of those things addresses the need, which I will state one more time:
When a user selects a drawing (places drawing into selected state/mode) and then right clicks to open the context menu, there needs to be the ability for the Drawing object to add drawing specific context menu items. The added context menu items are only on the context menu when a drawing of that type is selected (NOT all the time). When the context menu is closed, the added menu items need to be removed. Hence the suggested ContextMenuOpening/ContextMenuClosing event handlers. This should be trivial to add since NT already has the hook in place to do drawing based context menus when a drawing is selected.
This can all be done today using an indicator if you are clever, but that requires that you would have to apply that indicator to all charts which is rather dumb. Although, now that I think about it, I already have to do that in order to remove the ridiculous NinjaTrader copyright statement from "my" charts.
This is just a feature request. Please add it, and I will be happy to watch it disappear into the ether with most of the other ones which will never be implemented.
Comment
-
Hello aslane,
I didn't follow up with a tracking ID for this feature request.
For future reference, your request to for a Context menu open / close event for drawing tools is being tracked with ID #SFT-1905.
Please note it is up to the NinjaTrader Development to decide if and when a request will be implemented.Chelsea B.NinjaTrader Customer Service
Comment
-
Hello aslane,
I have created an example that adds context menu items to a drawing tool. You can reference that example here: http://ninjatrader.com/support/forum...366#post515366
Please let me know if we may be of further assistance.JimNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Today, 06:40 PM
|
0 responses
9 views
0 likes
|
Last Post
by algospoke
Today, 06:40 PM
|
||
Started by maybeimnotrader, Today, 05:46 PM
|
0 responses
7 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
7 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
8 responses
168 views
0 likes
|
Last Post
by jeronymite
Today, 05:00 PM
|
||
Started by cre8able, Today, 04:22 PM
|
0 responses
9 views
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
Comment