Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to create UserDrawn Ray from Indicator?

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

    Is it possible to create UserDrawn Ray from Indicator?

    I have an indicator to convert a UserDrawn Line to a Ray (works as I want).

    However, when I attempt to later delete the ray, I'm prompted indicating that the ray was drawn by my indicator, continuing to delete the ray will also remove the indicator from my chart.

    I'd like to be able to remove such converted objects without removing my indicator. I believe I have to create a UserDrawn object, but, I don't know how to do this in an indicator.

    Is it possible?

    Many Thanks

    DewSamurai

    #2
    Hello DewSamurai,

    Thank you for your post.

    You will need to use AllowRemovalOfDrawObjects: http://www.ninjatrader.com/support/h...rawobjects.htm

    Comment


      #3
      Thank you Patrick. That did the trick.

      Now, I can't delete the UserDrawn Line object.

      I'm calling RemoveDrawObject(line.Tag), but, the line still exists after the ray is created.


      Can an Indicator delete a UserDrawn object?

      Comment


        #4
        RemoveDrawObjecct does not work on manual (user) drawn lines and this is by design. You can only remove script generated objects.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Bummer.

          Thanks for the reply.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          671 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          379 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          111 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          575 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          582 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X