OPEN-SOURCE SCRIPT

Linear Regression Slope - Version 2

86945
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

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.