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

Delete draw line

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

    Delete draw line

    Hello,

    Is it possible from the strategy builder if I draw a line from all the closing of the candles (which I know how to do), those that have been touched by price in the future to be deleted an not remain on the chart (or to change the proprieties of it - let’s say if it is red to make it gray)? Is there a way to do this?

    That will be of great help,
    Ciprian

    #2
    Hello CiprianV,

    Thanks for your post.

    If you are drawing the line manually on the chart, no the strategy builder would be unable to reference it.

    If you are having the strategy builder draw the line, then yes you remove an object or you can re-draw the object with new parameters.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      So how can that be done from the strategy builder? What parameters I have to select in order for the strategy to delete the line and not do it manually?

      Comment


        #4
        Hello CiprianV,

        Thanks for your post.

        To clarify, in order for the strategy builder to be able to remove a line, the strategy builder has to be what draws the line initially. The strategy builder can only remove a line it has drawn.

        In the "do the following" section of a set you can select the "Drawing" folder and can select the line you wish to draw. You would have to provide when to start and end the line as well as the begin and end price of the line.

        To remove a line, in the same folder you can select Remove Draw Object and all you need to provide is the "Tag" name of the line to remove.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_PaulH I still don't get it how to delete a line that is done by the strategy. I've attached the strategy. All I want to do, is to remove the horizontal lines that have been touched after the line has been drawn. All it has to remain on the chart are the lines that were not touched by future prices.

          Sorry, but I'm not an expert into advanced setups in the strategy builder.

          Thanks for you help,
          Ciprian
          Attached Files

          Comment


            #6
            Hello CiprianV,

            Thanks for your reply.

            While it is possible to draw a line and remove it in the Strategy Builder, this would have to be limited to just a few lines as you would need to save the price level the line is drawn at and limit the line names to just a few so that you could then check price to each line and then remove it. I misread your first post thinking you wanted to draw and remove a line and you actually want to draw a line on all of the close points. You will not be able to accomplish your goal (in the strategy builder) of drawing many lines and removing them when price touches them because this would require a significant list of price levels that have the line as well as a list of drawing object tag names.

            It would be possible in a Ninjascript and you may want to look at this Ninjascript indicator to get an idea of the coding required which draws lines at swing points and removes them when price touches them. https://ninjatraderecosystem.com/use...ad/swingrays2/ Please note: The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Thanks,

              I’ll do my best to change the code to what I need.

              Thanks for your support
              Ciprian

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by samish18, 04-17-2024, 08:57 AM
              16 responses
              55 views
              0 likes
              Last Post samish18  
              Started by arvidvanstaey, Today, 02:19 PM
              3 responses
              9 views
              0 likes
              Last Post NinjaTrader_Zachary  
              Started by jordanq2, Today, 03:10 PM
              2 responses
              8 views
              0 likes
              Last Post jordanq2  
              Started by traderqz, Today, 12:06 AM
              10 responses
              18 views
              0 likes
              Last Post traderqz  
              Started by algospoke, 04-17-2024, 06:40 PM
              5 responses
              47 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X