TradingView
saolof
4 Dis 2019 pukul 04.25

Least Squares Bollinger Bands 

SPDR S&P 500 ETF TRUSTArca

Huraian

Similar to Bollinger Bands but adjusted for momentum. Instead of having the centerline be a simply moving average and the bands showing the rolling variance, this does a linear regression, and shows the LSMA at the center, while the band width is the average deviation from the regression line instead of from the SMA.

This means that unlike for normal Bollinger bands, momentum does not make the bands wider, and that the bands tend to be much better centered around the price action with band walks being more reliable indicators of undersold/oversold conditions. They also give a much narrower estimate of current volatility/price range.

Nota Keluaran

Cleaned up some code to make it more general. Now easy to modify with whatever moving average you like if you want to vary the weights on the linear regression. Also added a toggle to disable working with logged values.
Komen
Link77
@saolof
Just wanted to let you know these are great, really helpful to have and I really appreciate the effort that went into making/thinking of them.
saolof
Just wanted to add that I just added the functionality in this script to my "Better Bollinger bands" script as a checkbox setting.
Lebih