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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          174 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          330 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          252 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          356 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          183 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X