Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Remove all line or all arrow up from chart

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

    Remove all line or all arrow up from chart

    Hi guys!

    Please help me if its possible.

    I'd like to /from an indicator/ remove all special draw type from chart.

    For example
    RemoveDrawObject (all Hline)
    or
    RemoveDrawObject (all arrow up markers)

    I don't know and I don't care the tags name...

    So without tags, how can i do this?

    Thanks for advance
    w.

    #2
    I would try something like this. I haven't tested this but it should work.

    Code:
    foreach (IDrawObject draw in DrawObjects)
     {
             if (draw is ILine)
             {
                     Print("Line Object: " + draw.Tag);
                     RemoveDrawObject(draw.Tag);
             }
     }
    Instead of ILine you would use the drawing object you wish to remove
    More details here: http://www.ninjatrader.com/support/h...rawobjects.htm

    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Hi Lance!

      Thanks for your reply.

      Unfortunately is not working.
      If I draw manually a line on chart... I see the tag name in output window, but not removed...
      Can i remove it from an indicator?
      w.

      Comment


        #4
        wokitun, would unfortunately only work for lines drawn from the script. This is done purposely so malicious code could not influence other user / manual drawn objects.

        Comment


          #5
          Understood...thanks.

          w.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          598 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          555 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X