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

How to remove all drawing objects from a chart from code ?

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

    How to remove all drawing objects from a chart from code ?

    How can i remove all drawing objects on the chart from code ?
    Basicly i would like to do drawing tool-> remove all drawing objects to remove all objects, but without the confirmation question popping up whether i really want this or not.
    EB Worx
    NinjaTrader Ecosystem Vendor - EB Worx

    #2
    Hello Erwin BEckers,
    Thanks for your post.

    You can remove all drawing objects from your chart programmatically by using RemoveDrawObjects()
    Please see the following link for more information: https://ninjatrader.com/support/help...rawobjects.htm

    Additionally, we have a reference sample in the help guide that demonstrates how to remove a drawing object. Please see the following link for that: https://ninjatrader.com/support/help...s_from_the.htm
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Erwin Beckers View Post
      How can i remove all drawing objects on the chart from code ?
      Basicly i would like to do drawing tool-> remove all drawing objects to remove all objects, but without the confirmation question popping up whether i really want this or not.
      Erwin,

      You can download and Install my A MahToolBar indicator and use any drawing tool or remove all drawing objects with only one click. The ToolBar will install in the main chart toolbar to save chart space and you can select all or as many buttons for your favorite drawing tools as you wish. The indicator is located in User Apps section, Here:

      mahToolBar – Version 6 This version updates the code to includes several new icons for NT8 default Drawing Tools plus additional chart management tools. The mahToolBar6 indicator installs drawing tools icons in the NinjaTrader 8 Main Toolbar for a one-click drawing. The early version of this indicator with selected tools used sample scripts from several […]


      Cheers!

      Comment


        #4
        Thx Josh..
        but that will only remove the draw objects from that specific indicator or drawing tool.. I would like to remove ALL draw objects.. without popups asking for confirmation.

        Thx Aligator,
        yeah i saw your toolbar.. I'm actually building my own (floating) toolbar (see below) which has lots of extra tools llike Elliott wave, gann square, wolf range, auto range, custom risk/reward tools etc etc.
        using SendKeys kind of works.. But you get a popup asking are you sure you want to delete... all the time which i don't like.. and it requires users to setup a hotkey mapping..
        imo there should just be some simple api call available allowing us to clear the chart of any drawing objects..

        Click image for larger version

Name:	toolbar.jpg
Views:	1161
Size:	375.5 KB
ID:	1041527

        EB Worx
        NinjaTrader Ecosystem Vendor - EB Worx

        Comment


          #5
          Erwin Beckers,

          It is not currently possible to do this.


          I am seeing two separate feature requests that I will add a vote to on your behalf .

          The first, SFT-2062, is to remove the confirmation window when removing drawing objects.

          The second, SFT-356, is to add NinjaScript functionality to remove manually drawn objects.


          When a feature request is implemented, you'll find it in the release notes:





          Please let me know if you have any further questions.

          Josh G.NinjaTrader Customer Service

          Comment


            #6
            Erwin, I expect you will find it useful to examine how this toggle indicator works: https://ninjatraderecosystem.com/use...ers-and-wicks/

            BTW, thank you for creating and posting the Measured Move tool. I use it every day.

            Comment


              #7
              Can you add a vote for both SFT-2062 and SFT-356 for me as well. Thanks.

              Comment


                #8
                Hello ntbone,

                Thank you for your reply.

                I have added a vote for you to both SFT-2062 and SFT-356.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Lumbeezl, 01-11-2022, 06:50 PM
                31 responses
                817 views
                1 like
                Last Post NinjaTrader_Adrian  
                Started by xiinteractive, 04-09-2024, 08:08 AM
                5 responses
                14 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by swestendorf, Today, 11:14 AM
                2 responses
                6 views
                0 likes
                Last Post NinjaTrader_Kimberly  
                Started by Mupulen, Today, 11:26 AM
                0 responses
                7 views
                0 likes
                Last Post Mupulen
                by Mupulen
                 
                Started by Sparkyboy, Today, 10:57 AM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X