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

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 Waxavi, Today, 02:10 AM
          0 responses
          6 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          11 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          2 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by elirion, Today, 01:36 AM
          0 responses
          4 views
          0 likes
          Last Post elirion
          by elirion
           
          Started by gentlebenthebear, Today, 01:30 AM
          0 responses
          5 views
          0 likes
          Last Post gentlebenthebear  
          Working...
          X