Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Add object to DrawObjects
Collapse
X
-
Add object to DrawObjects
Is it possible to either 1) Create a drawing tool object and add it to the DrawObjects collection (or a more primitive class it inherits from) or 2) remove the owner from an Drawing object created by an indicator. I've created a simple toolbar to add drawing tools with specific properties but do not want them attached to an indicator. The indicator is just the means to and end... I'm also trying to avoid all the complications with RenderTarget.Tags: None
-
Hello richt3,
Thank you for your post.
Have you reviewed the "Drawing Tool Tile" indicator that comes with the platform by default? It draws objects that are AttachedTo.AttachedToType.Bars which I suspect is what you are looking for rather than having the drawing tools attached to an indicator. As for the properties used, it will draw objects with the default template applied. The source code for this indicator is available to view in the NinjaScript Editor and should be useful with the creation of your toolbar.
Otherwise, you could consider having an object that is manually drawn then use your indicator to loop through the DrawObjects collection and find the specific object you'd like to change the properties for. Then, it could modify the properties such as colors, anchors, etc. There is an example of looping through the DrawObjects collection to find specific draw objects on this page:All drawing tool objects share the properties on this page, which could also be some helpful information in creating and debugging your indicator:Please let us know if we may be of further assistance.
-
After hours of digging, before and after starting this post, this is the easiest solution out there:
Hello folks, I have been hard at work trying to come up with a workaround that attaches indicator drawn objects to the chart. The solution is not 100% and there are two major flaws. 1. If an object is not moved around before the indicator is removed, moving the object once the indicator is removed makes the object jumped to
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
581 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
338 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment