Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ownership of drawing objects

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

    Ownership of drawing objects

    Hello!

    My indicator draws some text objects on the price panel. The problem is that I'd like to delete some of them without also removing the indicator that created them. Is it possible to dissociate a drawing object from the indicator or to assign it to a different owner?

    #2
    Hello Gianpiero,

    To remove an object your indicator can do that in its logic. You would use the RemoveDrawObject("tag") method.

    Comment


      #3
      Thank you, that's interesting regarding a different approach to my problem. However, that's not exactly what I was looking for. I didn't explain myself clearly. What I want to do is to delete manually some text drawn algorithmically without also deleting the indicator from the chart

      Comment


        #4
        Hello Gianpiero,

        If a script draws an object that script owns the object through its lifecycle. To remove the object you would need to program into that indicator a way for it to delete it. That would be based on conditions or in a more advanced case you could add a custom button to the chart which calls RemoveDrawObject in the indiators code.

        Comment


          #5
          Ok, I understand, but how would I add such a button? Moreover, is it possible to assign a different owner instead of 'this'?

          Comment


            #6
            Hello Gianpiero,

            The owner would need to be the script which is managing it, that can be the indicator that draws it. There is not a way remove the owner so you can manually delete objects. You would need to make logic in that script to manage the objects in the way that you wanted.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            597 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