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 sjsj2732, Yesterday, 04:31 AM
          0 responses
          30 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          286 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          282 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          132 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          90 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X