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 usazencort, Today, 01:16 AM
          0 responses
          1 view
          0 likes
          Last Post usazencort  
          Started by kaywai, 09-01-2023, 08:44 PM
          5 responses
          603 views
          0 likes
          Last Post NinjaTrader_Jason  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          6 responses
          22 views
          0 likes
          Last Post xiinteractive  
          Started by Pattontje, Yesterday, 02:10 PM
          2 responses
          21 views
          0 likes
          Last Post Pattontje  
          Started by flybuzz, 04-21-2024, 04:07 PM
          17 responses
          230 views
          0 likes
          Last Post TradingLoss  
          Working...
          X