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.

    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    608 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    355 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    560 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    561 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X