Does anyone know how to identify which drawing object is currently selected?
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
Identify User-Selected Drawing Object
Collapse
X
-
Originally posted by drmartell View Post(I realize this is likely going in to unsupported territory.)
Does anyone know how to identify which drawing object is currently selected?
If there is anything, it should be in the CO object
Hopefully, loop through all objects, and hopefully there is some sort of a 'selected' property to check.
Using the auto fill in when typing should list out what is available. (Sorry, I don't have NT up at the moment to check).
-
Originally posted by drmartell View PostSorry could you further explain what you mean by the CO object. I know there is no documented 'selected' property.
In the link to the other thread, there is a bunch of code that describes how to loop through ChartObjects that are in the chart.
Look at NT_RyanM sample indicator he wrote for a complete sample.
Code:List<ChartObject> ChartObjectArrayList = new List<ChartObject>(); foreach (ChartObject CO in this.ChartControl.ChartObjects) { if ( CO is NinjaTrader.Gui.Chart.ILine ) { ChartObjectArrayList.Add(CO); }
Comment
-
-
Originally posted by drmartell View PostHmmm, I can't find the code you referenced in the LineAlert indicator to which you linked. However the snippet you provided might get me somewhere. . .
This will probably only tell if the ChartObject is selectable.
A far cry from selected.
Comment
-
Originally posted by drmartell View PostHmmm, I can't find the code you referenced in the LineAlert indicator to which you linked. However the snippet you provided might get me somewhere. . .
if (this.ChartControl.ContainsFocus)
This works for the whole chart, but not objects.
I'm not sure it is possible.
Hopefully someone else might have an idea.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by lucasmelo152, 06-28-2021, 12:51 PM
|
8 responses
2,123 views
0 likes
|
Last Post
by Ymcapital
Today, 04:31 PM
|
||
Started by Creamers, 04-27-2024, 05:32 AM
|
11 responses
68 views
0 likes
|
Last Post
by Creamers
Today, 04:30 PM
|
||
Started by NM_eFe, 04-30-2024, 06:14 AM
|
5 responses
32 views
0 likes
|
Last Post
by NM_eFe
Today, 04:28 PM
|
||
Started by Jonker, 04-27-2024, 01:19 PM
|
2 responses
20 views
0 likes
|
Last Post
by Jonker
Today, 04:25 PM
|
||
Started by Max Baxter, 03-07-2019, 09:20 PM
|
8 responses
267 views
0 likes
|
Last Post
by Ymcapital
Today, 04:17 PM
|
Comment