Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Identify selected drawing object drawn by an indicator

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

    Identify selected drawing object drawn by an indicator

    I have an indicator that draws a number of objects on the chart. There are occasion where I would like to delete one of the object without removing the indicator from the chart.

    When I click on an indicator drawn object, it gets "selected". If I double click I can see all the info on the drawing object. I am able to uncheck the visible box and the object disappears so it's no longer visible.

    But what I would like to do, is click on an object and remove it so the indicator no longer has to process the object.

    Is there a way for the indicator to "read" which draw object is selected? Read the object tag, for example?

    If so, I can add a button to my chart to remove the "selected" drawing object

    #2
    Hello cre8able,

    Thank you for your post.

    Yes, you could loop through the collection of Drawing Objects and check the drawing state of the object. If the state is DrawingState.Editing, you could call RemoveDrawingObject() on that object.

    DrawObjects - https://ninjatrader.com/support/help...rawobjects.htm

    IDrawingTool - https://ninjatrader.com/support/help...rawingtool.htm

    DrawingState - https://ninjatrader.com/support/help...awingstate.htm

    RemoveDrawObjects - https://ninjatrader.com/support/helpguides/nt8/removedrawobject.htm

    Please let us know if you have any further questions.

    Comment


      #3
      Great
      thank you

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      576 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      334 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X