This is a fast trend line regressor based on least squares regression.
(1) Supports setting regression from the Nth candle (2) Supports the minimum and maximum regression candle interval length (3) Supports finding the optimal regression region based on the length step among the minimum and maximum regression region lengths (4) Supports displaying the optimal regression level (5) The size of the regression region is 0.5 times the standard deviation by default (6) You can filter the trend line by setting minimum trend line regression level (6) Please properly set the parameters to avoid calculation timeout
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 publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.