Daily Polynomial Regressions
By LuxAlgoMar 25, 2026
Daily Polynomial Regressions fits a best-fit curve to the current session's price action and redraws it live inside an expanding daily box. Rather than smoothing like a moving average, it solves a polynomial regression outright, the Normal Equation (X'X)B = X'Y computed in matrix form for the chosen degree, and resets every accumulator at the daily open, so the curve describes today and only today. Box and curve turn bullish or bearish depending on whether the regression's endpoint sits above or below the day's starting point; the current day's fit updates with each new bar and is subject to repainting.
How to Trade the Daily Polynomial Regressions?
- Curve direction and color: the fastest read on session structure: bullish when the fitted path ends above the day's start, bearish below it.
- R² label: values near 1.0 mean price is hugging the curve, an orderly, trend-friendly session; low values flag chop where trend entries deserve extra caution.
- Distance from the curve: the fit behaves like a session-anchored mean, so stretched moves away from it mark intraday mean-reversion candidates.
- Median line: the optional dashed HL2 midpoint locates price within the day's high-low range.
Degree selection sets the personality: degree 1 draws a straight trend line, degree 2 captures acceleration and rounded turns, and degrees 3 to 4 flex around multiple momentum shifts at the price of more reactivity.
Daily Polynomial Regressions Settings
- Polynomial Degree: complexity of the fit: lower for clean structure, higher for adaptability to intraday shifts.
- Show Median Line: toggles the dashed midpoint line built from the daily high-low range.
- Show R² Label: displays the fit-quality score at the top of the session box.
- Bullish Color / Bearish Color / Fill Transparency: session box styling for each regime.
Frequently Asked Questions
Free indicator
Get free access to this indicator on the platforms below.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.

