Linear Regression Price Projections with Correlation and Range Statistics
Summary
This indicator fits linear models between a selected price series and time, then displays projections for several future candle horizons. Its chart table is designed to show projected values, upper and lower ranges based on a residual standard error, correlation between price and time, and historical rates at which observations fell within the modeled range. Correlation thresholds are also used to label trends as moderate, strong, or unclear. Users can choose the source series, assessment length, backtest lookback, and display options.
The script supplies descriptive diagnostics and projections, not evidence of dependable forecasts: the document reports no independent performance results. The code uses a lookahead-enabled data request, which can introduce future leakage or repainting in historical chart analysis. Its regression and range calculations also depend on implementation choices and assumptions that are not justified in the description. Correlation with time and historical range coverage should therefore be read as model diagnostics rather than proof that future prices will follow the projected path.
Key ideas
- The indicator fits linear regressions of a chosen price source against time across multiple horizons.
- It estimates upper and lower projection ranges using a residual standard error calculation.
- Correlation values are displayed and mapped to categorical trend labels.
- Historical range pass rates summarize how often observations fell within modeled bounds over a selected lookback.
- Lookahead-enabled data retrieval can compromise historical validation, and the document gives no independent evidence of forecast reliability.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.