This script draws trendlines from the pivot points in the price chart.
The input for the function that draws the trendlines is any calculation or function (eg. pivot points ),
that most of the time and occasionally produces a 'non n/a' value.
The trendline function then connects the non n/a values and extends the connections of those points in a trendline.
There is an option to draw the lines from the wicks or from the 'real bodies' of the candles.
The trendlines can either extend infinitely or only run for an adjustable amount of bars.