Linear-Regression Deviation Bands for Peak Signals
Summary
This indicator fits a linear regression to a selected price series over a configurable lookback, which defaults to 100 bars. It estimates dispersion around the fitted line from the squared residuals, then places upper and lower bands at a chosen multiple of that deviation; the default multiplier is two. Signals are generated when price crosses percentage-adjusted versions of these bands: a low-side crossing marks a potential low, while a high-side crossing marks a potential high. The script also defines alert conditions and includes long and short entries.
The parameters include separate percentage offsets for the low and high signals, each defaulting to five percent. The published settings describe a BTC-USDT Binance test spanning roughly a year on four-hour bars with 15-minute base data. No backtest results or signal accuracy are reported. The source is labeled as a study while also containing strategy-entry calls, so its intended indicator-versus-strategy behavior is unclear. The method’s signals should be treated as candidate turning points, not confirmed reversals.
Key ideas
- A rolling linear regression provides the centerline for the detector.
- The indicator estimates residual dispersion and scales upper and lower bands by a configurable deviation multiple.
- Percentage-adjusted band crossings mark potential lows or highs and can trigger alerts.
- The defaults include a 100-bar lookback, a deviation multiple of two, and five-percent offsets.
- No performance evidence is reported, and the source mixes indicator and strategy constructs.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.