OPEN-SOURCE SCRIPT
Linear Regression Slope - Version 2

Version 2 - Linear Regression Slope. This version will have more freedom on picking your own length for all the Inputs.
One of the main reason I changed it is because, Slope calculation on transition period was not being computed properly. Because the Version 1, looks back the length assigned, and compute the slope based on two candle readings, could be 10 days apart or 50. That was misleading.
Therefore, I changed it to plot daily slope and Smooth it with an EMA.
Linear Regression Curve - tradingview.com/v/JojPxTRD/
List of All my Indicators - tradingview.com/p/stocks/?sort=recent&time=day&by=ucsgears
One of the main reason I changed it is because, Slope calculation on transition period was not being computed properly. Because the Version 1, looks back the length assigned, and compute the slope based on two candle readings, could be 10 days apart or 50. That was misleading.
Therefore, I changed it to plot daily slope and Smooth it with an EMA.
Linear Regression Curve - tradingview.com/v/JojPxTRD/
List of All my Indicators - tradingview.com/p/stocks/?sort=recent&time=day&by=ucsgears
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Uday C Santhakumar
Disclaimer
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Uday C Santhakumar
Disclaimer
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.