To use this, you want to do trades something like this:
The bottom -0.80 (green line) means that the trend is very strong in the upward direction. This almost always means it's about to finish its trend soon and reverse the other direction. If you see the other lines also coincide with this result it would best to get ready to reverse your position and do a short once some other indicators show you it is turning the other direction in addition to this.
The reverse for longing would be the case after a large downtrend and the 0.80 line (red line) is touched by many of the linear regressions, usually it means the downtrend is ending and there is a good buy opportunity soon.
This is called a variable systems because you can set as many variable linear regressions as you want. I have capped it at 10 but you can modify the code to raise this if really necessary. Every color is customizable for each different trend.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.