NinjaTrader.NinjaScript.DrawingTools.HorizontalLine hline = DrawObjects["@Horizontal Line 12"] as NinjaTrader.NinjaScript.DrawingTools.HorizontalLine; hline.StartAnchor.Price = 2400;
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Update all global drawing objects from an indicator
Collapse
X
-
Update all global drawing objects from an indicator
I have a global horizontal line and I want it to be updated across all charts when I change the price level from an indicator. The line is only updated on the chart with this indicator. Is there a method that synchronizes this change across all charts? Sample code below:
Code:Tags: None
-
Hi hurleydood, thanks for your note.
The anchor properties of drawing tools are read only:
It would be more straight forward to remove the draw object with the RemoveDrawObject method and draw a new one.
Please let me know if I can assist any further.
-
The documentation for RemoveDrawObjects says it only removes script drawn objects. I want an indicator to have the ability to update user drawn objects. Is there a method to remove also user drawn objects?Note: This method will ONLY remove DrawObjects which were created by a NinjaScript object. User drawn objects CANNOT be removed from via NinjaScript
Comment
-
Can put in a feature request to be able to update user drawn objects from an indicator? The DrawingTools seem to be able to update user drawn objects across all charts.
Comment
-
In the DrawingTools there is a method called OnMouseUp. Any modification to the editingAnchor.Price does not carry changes to the carry changes over to other charts but only the current chart. However OnMouseMove does allow editingAnchor.Price to be modified across all charts. Can you also allow OnMouseUp method to modify editingAnchor.Price across all charts?
Comment
-
Hi hurleydood, thanks for your patience.
Sure, I will submit a feature request to allow more control from NinjaScript indicators on user drawn chart objects. I will update this thread here when I have a feature tracking ID.
Last edited by NinjaTrader_ChrisL; 03-24-2020, 03:58 PM.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
574 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment