Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Deleting objects on a chart

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

    Deleting objects on a chart

    Alrighty....here is the issue I am having.

    I have an indicator that is drawing objects on a chart (triangles in this instance). It has a special way of scanning across the charts, and this is causing it to leave invalid objects on the chart.

    The objects are named with a (unique tag)+(the three time codes of the triangle). The only method I have found to remove objects from a chart is via the ClearOutputWindow() method. I use this method in the Initialize() method to setup a clean chart when dropping the indie on said chart. Since it clears ALL objects, this is the worst possible method to deal with removing these stray objects after the indie is on the chart.

    So, my question is are there any commands specific to deleting objects from a chart based on all or part of the object name? In mql4, I use the ObjectDelete(object name here) command. I have hunted some something similar in ninjascript, but nothing has turned up so far.

    Thanks for any help anyone can provide!

    #2
    Hello Antny,

    Thank you for your post.

    The method RemoveDrawObject() will work in this case: http://www.ninjatrader.com/support/h...drawobject.htm

    Comment


      #3
      Perfect! That is exactly what i was looking for.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      605 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      351 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