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 Torontobluejays, Today, 08:43 AM
|
0 responses
1 view
0 likes
|
Last Post Today, 08:43 AM | ||
Started by sastrades, 01-31-2024, 10:19 PM
|
12 responses
190 views
0 likes
|
Last Post
by sastrades
Today, 08:33 AM
|
||
Started by Jimmyk, 01-26-2018, 05:19 AM
|
8 responses
864 views
0 likes
|
Last Post
by emuns
Today, 08:08 AM
|
||
Started by giulyko00, 04-24-2024, 12:03 PM
|
6 responses
29 views
0 likes
|
Last Post
by giulyko00
Today, 08:07 AM
|
||
Started by 00nevest, 04-27-2024, 02:27 PM
|
3 responses
27 views
0 likes
|
Last Post
by 00nevest
Today, 07:37 AM
|
Comment