Does anyone know how to identify which drawing object is currently selected?
Announcement
Collapse
No announcement yet.
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).
-
I'm not sure how far along you are in your research, I've started at the beginning.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
-
I could only find this: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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
332 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment