OPEN-SOURCE SCRIPT

Linear regression slope as SAR

Updated
This model calculate the slope of the linear regression and give you the uptrend or the down trend of the slope

red line are downtrend and green line are up trend
using len 1 you can make it longer or shorter (I put it on length of 40 but you can change that to what ever you want )
Similar to SAR it can give us the trends of buy and sell only by doing it by the linear way

try longer length to see if it smooth the signal

4 hour graph
snapshot
Release Notes
add color zone for berish and bullish area as option
Linear Regression

Open-source script

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.

Want to use this script on a chart?

Disclaimer