I have coded this "Auto Trend Channel" script to help myself to draw a perfect trend. I usually use "Open / Close" as source. Play around with the "Lookback" period to find the best fit. Hope you enjoy it.
Note: This indicator repaints as highs and lows changed.
Remember to follow me and drop some comments below.