• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Swing High and Low Close Lines

  • Filter
  • Time
  • Show
Clear All
new posts

    Swing High and Low Close Lines

    I would like an indicator that will draw colored lines on a chart at the previous highs and lows candle closes. I would like these lines removed when a new candle closes thru the line. Can anyone help with this request. I use these lines as support/resistance, but it's a real pain trying to keep them updated.

    Hello Ussdotsons,

    Thank you for your note.

    Do you want the lines to be replotted or completely removed?
    Cal H.NinjaTrader Customer Service



      I honestly don't know. I think my first choice would be to just remove them. However, it would be perfect to have an option that would either remove them or simply stop them at the break candle. That would allow someone to crunch the chart and see clearly areas where closing pivots have developed over time.
      Also, I do want to clarify my original post. I am looking to have these closing lines develop from pivots as I see them. Even a one candle move against the wave forms a pivot IMHO.
      And it would be super great to have the option of drawing another line from the end of the tail of every pivot candle, ie a dashed line from the tail and a solid line from the close. The concept being that a reversal candle that opens anywhere between a previous closing pivot and the end of the wick of that closing pivot candle is a playable 100% retracement, but if it opens beyond the wick it invalidates the setup.
      Thank you so much for even considering my request.
      And one last thought. I would always simply remove the end of wick lines, however there are lots of traders who want simply the high/low. So an option to stop at the break candle or remove the wick lines would probably be best. As well as an option to only use one instead of both. That would allow those that only want the high/low to not even have the close on their charts.
      Last edited by ussdotsons; 05-11-2014, 02:10 PM.


        Hello ussdotsons,

        Thank you for your response and welcome to the NinjaTrader Support Forum!

        For the removal of the objects you would need to use the RemoveDrawObject() method: http://www.ninjatrader.com/support/h...drawobject.htm
        If you wanted to stop the Lines on the break bar you would need to use the DrawLine() method rather than the DrawHorizontalLine() method: http://www.ninjatrader.com/support/h...7/drawline.htm

        We have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.
        A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

        I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._resources.htm

        You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
        Click here to see our NinjaScript Reference Samples: http://www.ninjatrader.com/support/f...splay.php?f=30
        Click here to see our NinjaScript Tips: http://www.ninjatrader.com/support/f...ead.php?t=3229

        These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.

        There is a also a growing library of user submitted custom indicators (100+) that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there: http://www.ninjatrader.com/support/f...splay.php?f=37

        If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
        Click here for a list of certified NinjaScript Consultants: http://www.ninjatrader.com/Ecosystem/NonBroker.php#81

        Please let me know if you have any questions.
        Patrick H.NinjaTrader Customer Service


          Hi ussdotsons
          I read your post with interest, since your concept to use lows/highs of a candle as short term support/resistance values is also a concern of mine.
          Unfortunately, my skills as NinjaScript developer are very limited, but if it may help you somehow as a starting point, I'm herewith enclosing a very simple strategy of mine.
          It is not meant to draw the mentioned lines, but it will provide a reliable alert whenever the price crosses below the support or above the resistance traced by the last candles.
          For this aim I'm using opens and closes, but highs and lows are also suitable.
          Perhaeps you may profit of them for drawing your lines.
          Attached Files


            Thanx. I'm not sure what to do with a .cs file.


              It may be used as an alert strategy, i.e. copied to the "...\MyDocuments\NinjaTrader 7\bin\Custom\Strategy" folder, then compiled through the related button as in the attachment, then enabled in the Tools/Strategies tab with a mouse right click -> "New strategy".
              I thought you were familiar with NinjaScript and could edit it for your convenience, since it identifies any short term support/resistance level.
              Attached Files


                OK Thanx. I'll try it.


                Latest Posts


                Topics Statistics Last Post
                Started by zacharydw00, Today, 10:19 PM
                0 responses
                Last Post zacharydw00  
                Started by chafan11, Today, 09:28 PM
                0 responses
                Last Post chafan11  
                Started by GreenspanAlec, Today, 05:32 PM
                0 responses
                Last Post GreenspanAlec  
                Started by mrwarkhan, Today, 03:45 PM
                0 responses
                Last Post mrwarkhan  
                Started by momchi, Yesterday, 10:09 PM
                3 responses
                Last Post NinjaTrader_ChrisL