• 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 TikDaddy, Today, 02:08 PM
    2 responses
    7 views
    0 likes
    Last Post NinjaTrader_JoshG  
    Started by Brillo, Today, 01:52 PM
    0 responses
    12 views
    0 likes
    Last Post Brillo
    by Brillo
     
    Started by TazoTodua, 02-09-2018, 08:40 AM
    10 responses
    880 views
    0 likes
    Last Post NinjaTrader_JoshG  
    Started by TazoTodua, Yesterday, 04:35 AM
    6 responses
    18 views
    0 likes
    Last Post eDanny
    by eDanny
     
    Started by MattP, Today, 12:25 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Working...
    X