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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          161 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          310 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          245 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          350 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X