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 cutzpr, Today, 08:54 AM
            0 responses
            5 views
            0 likes
            Last Post cutzpr
            by cutzpr
             
            Started by benmarkal, Today, 08:44 AM
            0 responses
            5 views
            0 likes
            Last Post benmarkal  
            Started by Tin34, Today, 03:30 AM
            2 responses
            26 views
            0 likes
            Last Post Tin34
            by Tin34
             
            Started by sastrades, Yesterday, 09:59 AM
            2 responses
            38 views
            0 likes
            Last Post brucerobinson  
            Started by ETFVoyageur, Today, 12:52 AM
            1 response
            21 views
            0 likes
            Last Post Leeroy_Jenkins  
            Working...
            X