Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Remove draw objects created in Indicator in Strategy - HOW?
Collapse
X
-
Hello kenz987,
Thanks for your post.
From the help guide, the Property AllowRemovalOfDrawObjects is defined as, "Determines if programmatically drawn DrawObjects are allowed to remove manually from the chart" also "When set to true, the draw objects from the indicator or strategy can be deleted from the chart manually by a user. If false, draw objects from the indicator or strategy can only be removed from the chart if the script removes the drawing object, or the script is terminates. Default set to false."
Reference link: https://ninjatrader.com/support/help...rawobjects.htm
So the property itself does not remove the objects, it just determine if the user can manually remove them.
To remove the objects by your script you would use either:
RemoveDrawObject() (On a per object basis) or RemoveDrawObjects() (removes all draw objects)
References:
Here is a link to an educational example of removing draw objects: https://ninjatrader.com/support/help...s_from_the.htm
-
Paul, Thank you for your time, but you did not answer my question. So a very basic function of a Strategy removing an arrow after it has served it's purpose is not possible... I think you should add that as a NEW feature, as if nobody else has ever needed it before. I was hoping something simple like changing the owner from "this" to something like "all" would do the trick. Guess not.
Comment
-
Hello kenz987,
Thanks for your reply.
To remove the objects by your script you would use either:
RemoveDrawObject() (On a per object basis) or RemoveDrawObjects() (removes all draw objects)
References:
https://ninjatrader.com/support/help...drawobject.htm
https://ninjatrader.com/support/help...rawobjects.htm
Another way to remove objects is if you use the same "tag" name for the same type draw object, only the latest occurrence of a draw object will remain on the chart. When you use the same tag name, the method will look for an existing object with that name and will first remove it before drawing the new one in the new location.
Comment
-
It happen me the same, I use AddChartIndicator to call from the strategy to any indicator... then in the indicator I use some removedrawobject but it doesnt work that in strategy... wearOriginally posted by kenz987 View PostI have used AllowRemovalOfDrawObjects in both indi and Strat, but it does not work. What else must I do to remove arrows in Strategy? Thanks.
did you resolve?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
63 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
139 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment