• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RemoveDrawObjects selective

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    RemoveDrawObjects selective

    Hello,

    I have a lot of drawings from an indicator and all works fine but I need to remove them selective. I know how to remove a special drawing RemoveDrawObject("name"); or all RemoveDrawObjects();
    but I need to remove eg all lines but keep rectangles. Is this possible please?

    Thank you!
    Tony

    #2
    Hello tonynt,

    When you create the objects you could add these to different arrays. Like one array for lines, another array for rectangles..
    Then you could loop through that array and use RemoveDrawObject() to remove each item. (You would also want to remove the object from the array as well)

    Below is a public link to a 3rd party educational site on arrays and for loops.
    https://www.dotnetperls.com/array
    https://www.dotnetperls.com/for
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Parmenides48, 04-09-2019, 03:32 AM
    8 responses
    43 views
    0 likes
    Last Post brucerobinson  
    Started by NinjaCustomer, Today, 01:48 AM
    0 responses
    2 views
    0 likes
    Last Post NinjaCustomer  
    Started by aligator, Yesterday, 10:11 PM
    0 responses
    2 views
    0 likes
    Last Post aligator  
    Started by psquare, Yesterday, 03:11 PM
    4 responses
    20 views
    0 likes
    Last Post psquare
    by psquare
     
    Started by ballboy11, Yesterday, 03:20 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X