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
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.htmPaul H.NinjaTrader Customer Service
-
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.
Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
19 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
20 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment