Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 DayTradingDEMON, Today, 09:28 AM
      3 responses
      19 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Stanfillirenfro, Today, 07:23 AM
      9 responses
      23 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by George21, Today, 10:07 AM
      0 responses
      8 views
      0 likes
      Last Post George21  
      Started by navyguy06, Today, 09:28 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by cmtjoancolmenero, Yesterday, 03:58 PM
      8 responses
      33 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X