Return the LinearRegression value of selected price over the last N periods.
This indicator represents the buyers and sellers who trade away from the equilibrium price.
The equilibrium could be compared to this lenearRegression line.
In order to limit extreme prices relative to thisequilibrium price it is worth plotting the raff channel which will represent the straight Linear Regression line and two supposed extreme lines to represent maximum variations.
You could use this script in ProBuilder to display the Linear Regression Oscillator. You should make a copy pasting in ProBuilder REM Linear Regression
REM linear Regression Oscillator
lasthigher = Highest(high)
higherB = LinearRegression(lasthigher)
lastlower = Lowest(low)
lowerB = LinearRegression(lastlower)
center = (higherB+lowerB) / 2
RETURN higherB as "Higher Band", lowerB as "Lower Band", center as "Center"