I don't trade much with trend lines , but I was bored so made this hopefully someone will make use of it or program a strategy with it or something like that. It finds the highs and lows, works out the distance in time and price, then uses that to calculate the angle of the trend which can be used to pain the trend line . If you have any questions on how to implement it into a strategy feel free to ask. It is written in quite a messy wayt so sorry about that.
Tradingview changed pinescript so this version works. If the check value is too high it won't work for some reason, I'll fix it when I work out why