• Overview
  • Reviews
  • Comments
  • What's new

Auto Trendline Plotter


This indicator draws all possible trendlines between every top or every bottom. The indicator works on all timeframes and with all symbols. Furthermore it has two trendline drawmodes that allow for high/low trendlines and closeprice trendlines to be plotted automatically. The candlestick range in which the trendlines will be drawn is fully customizable and the maximum range which can be set equals the maxbar range on the chart. The indicator also checks after each current candlestick close whether any trendlines have been broken by that candlestick. If thats the case it automatically removes those broken trendlines and automatically searches for new tops or bottoms to connect with prior tops or bottoms.

It has the ability to create trendchannels and horizontal trendlines which can be turned on or off by the user. When it creates a trendline for a top trendline it does so by copying a top trendline and placing the copied line on the nearest bottom available in the chart making the resulting trendchannel as narrow as possible. If this copied line gets breached it is automatically placed on the next nearest bottom which makes the trendline channel wider and wider. This continues on until the top trendline itself is breached which results in both trendlines of the trendchannel to be removed. The copied line is deliberately placed on a single bottom because then you can determine whether the actual price line will bounce off of this copied trendchannel line. If it does then an actual trendchannel is formed, if it doesn't the copied line is placed on the next nearest bottom. It works the other way around when the trendline is on 2 bottoms and the copied line must be placed on a top.

All trendlines / trendchannels and horizontal lines differ in color from one another in order to avoid confusion. Furthermore the indicator identifies a top or a bottom via a 3 candlestick pattern, so for example a top consists of a middle candlestick of which the closeprice or high is higher than the close or highprices of the candlesticks on either side. Please see the screenshots for visual examples. Screenshot 1 displays the Closeprice drawmode with trendchannels and horizontal lines enabled. Screenshot 2 displays the high/low drawmode. Screenshot 3 shows you the controlpanel with the many options the indicator has.


  • MaxBarsBack: Sets the candlestick range in which the trendlines can be plotted.
  • SwingMode: Sets the trendline drawmode Close/Close or High/Low
  • DrawHLines: Draws horizontal trendlines on any top or bottom if set to True
  • DrawCopyLines: Draws a dotted parallel trendline on the nearest bottom/top if set to True.
  • CopyLineStyle: Sets the style of the copied trendline of a trendchannel (default is Dot)
  • CopyLineWidth: Sets the width of the copied trendline of a trendchannel (default is 1)
  • CountBarsTo: Sets the most recent candlestick/bar from which to start plotting trendlines (default is bar[2] minimum value is 0)

This indicator might save you a lot of time because you no longer need to draw trendlines manually.

The demo of this indicator can only be tested in the strategy tester.

No reviews
Version 1.21 - 2016.12.07
*Changed default trendline draw period to 200.

*Added an option that makes the indicator ignore the 3-candlestick top/low rule for the High/low trendline drawmode and draw all possible high/low trendlines.