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

Allow Removal of Object

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

    Allow Removal of Object

    Hi,

    In NT7 there was a command "AllowRemovalOfObject" that, if set to true, allowed for objects drawn by an indicator to be manually removed later on.
    I did a search on this forum, but found nothing similar for NT8.
    Does something like this exist?

    Thanks

    #2
    Hello laocoon,

    Thank you for your post.

    I believe that AllowRemovalOfDrawObjects is what you are looking for in NinjaTrader 8:


    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Perfect, that's it!
      Thanks so much

      Comment


        #4
        I just added this to my indicator (exactly like it is explained in the link you sent me):
        AllowRemovalOfDrawObjects = true;
        But when I try to manually remove an object drawn by my indicator, I get this message:
        This object was drawn by an indicator or strategy. Removing this object will also remove the indicator/strategy that created this object".

        I'm lost.

        Comment


          #5
          Hello laocoon,

          Thank you for your reply.

          Where in your script do you have this line?
          Code:
          AllowRemovalOfDrawObjects = true;
          If you add a print in OnBarUpdate(), for example, what value prints out for this property?
          Code:
          Print("AllowRemovealOfDrawObjects is: " + AllowRemovalOfDrawObjects);
          That print should display either true or false in the NinjaScript Output window. Based on your description, it sounds as though the property is set to false somewhere.

          Please let me know if I may be of further assistance.
          Emily C.NinjaTrader Customer Service

          Comment


            #6
            Thanks so much Emily, I found my mistake. I had the line in the wrong place (ie at the very beginning of the code where all other variables are set to true.)
            Now I have it right below "protected override void​" and it's working.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by lightsun47, Today, 03:51 PM
            0 responses
            2 views
            0 likes
            Last Post lightsun47  
            Started by 00nevest, Today, 02:27 PM
            1 response
            8 views
            0 likes
            Last Post 00nevest  
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            42 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            13 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            8 views
            0 likes
            Last Post port119
            by port119
             
            Working...
            X