TradingView
cryptographic1
2017年10月25日午前1時9分

Linear Regression Slope (Actual) 

XRP / DollarBitfinex

詳細

Linear Regression Slope is useful for determining if a trend is strengthening or weakening.

This is a true calculation of linear regression slope rather than a numerical differentiation calculated by subtracting previous linear regression value from current linear regression value. TradingView does not include a linear regression slope formula, but the built-in formula for linear regression does include the offset parameter which multiplies linreg slope as shown below:

linreg(source, length, offset) -> linreg = intercept + slope * (length - 1 - offset)

So therefore we can calculate linreg slope by subtracting a linreg with offset 0 from a linreg with offset 1. Easy peasy :) Much cleaner and smoother than taking the difference between current linreg value and previous linreg value also.

コメント
Khksucharitha
Linear regression is a very good indicator,how can I add it to price chart without getting it separately
royal_jatt
@Khksucharitha, use true instead of false : study(title="Linear Regression Slope", shorttitle="LRS", overlay=false)
OVARIDE
Good stuff. Using Length 70 to confirm trade exits on 1 min timeframe. Very accurate in most cases. I am also using the LRS by ucsgears to confirm this LRS and avoid premature exits....which rarely happens.
ElectricSavant
I know this is over 2 years later....but zmm20 if you are still here it would be great to make your plot line multicolored.

ES
LBDZJZLQX_QiMenCrypto
Will test it out Thanks
詳細