Daily Polynomial Regressions
Mar 25, 2026

The Daily Polynomial Regressions indicator is a trading indicator built to map intraday price action with a daily polynomial regression curve, helping traders read trend direction, trend quality, and potential mean reversion zones inside each trading session. By recalculating a best-fit curve every day using matrix-based polynomial regression, it gives a clearer view of whether price is moving in an orderly trend, accelerating, slowing down, or starting to lose structure. For traders looking for an intraday trading strategy, trend-following tool, or session-based mean reversion indicator, this script offers a flexible way to visualize how price is behaving throughout the day.
The fit for the current day may be subject to repainting
How to Trade the Daily Polynomial Regressions Indicator
The indicator marks each trading day with a live box that expands as new highs and lows are made. Inside that session box, it draws a polynomial regression curve that represents the best-fit path of price action for the current day. Instead of relying on a basic moving average, this approach adapts to the actual shape of the session, which makes it especially useful for traders who want a more nuanced view of intraday momentum.
Because the regression is recalculated throughout the day, the curve can help traders understand whether price is trending smoothly, becoming unstable, or stretching too far away from its statistically fitted path.
The Daily Polynomial Regressions indicator is especially useful for identifying:
- Intraday Trend Direction: The box and regression curve change color depending on whether the current regression endpoint is above or below the day’s starting point. This gives traders a quick read on whether the session is behaving in a bullish or bearish way.
- Trend Strength: A higher R² value means price is tracking the regression curve more closely. In practical terms, this suggests the day’s trend is cleaner, more structured, and easier to follow as part of a trend trading strategy.
- Mean Reversion Opportunities: Because the curve acts like a dynamic, session-based average, traders can use it to spot when price is becoming extended above or below the expected path of the day.
Traders can use this trading indicator in several ways. In trending conditions, the regression curve can serve as a visual trend guide, helping confirm whether price is continuing in a steady bullish or bearish structure. In choppier sessions, distance from the curve can highlight overextended moves that may revert back toward the fitted path. This makes the indicator useful for both momentum traders and traders looking for intraday pullback or reversion setups.
Indicator Logic and Trading Concepts
How Polynomial Degrees Affect the Regression Curve
The indicator allows users to choose different polynomial degrees, which directly changes how sensitive and flexible the regression curve becomes:
- Degree 1 (Linear): Fits a straight line and is best for simple directional sessions. This is the cleanest setting for traders who want a basic trend indicator without extra curvature.
- Degree 2 (Quadratic): Fits a parabola-like curve, which can help reveal trend acceleration, deceleration, or rounded reversals during the day.
- Degree 3 (Cubic) & 4 (Quartic): These higher-degree settings create more flexible curves that can respond to multiple momentum shifts inside the same session. They can be useful when price action is more complex, but they may also be more reactive.
In general, lower degrees provide cleaner structure, while higher degrees provide more adaptability. Traders can choose the setting that best matches the asset’s volatility and their preferred intraday trading strategy.
Matrix-Based Regression Calculation
A key feature of this script is that it does not approximate the regression in a simplistic way. Instead, it uses matrix calculations to solve the Normal Equation:
(X'X)B = X'Y
This allows the indicator to calculate the polynomial coefficients directly for the selected degree. In simpler terms, the script mathematically finds the curve that best fits the day’s price action up to the current bar.
All calculation accumulators reset at the start of each new day. This is important because it keeps the indicator strictly focused on intraday price behavior rather than blending information from previous sessions. For day traders, this daily reset makes the tool more relevant than broader regression tools that do not separate one session from the next.
What the R-Squared Value Means
The R² statistic is calculated as:
1 - (SSres / SStot)
R² measures how much of the day’s price variation is explained by the polynomial model. The closer the value is to 1.0, the more closely price is following the regression curve.
From a trading perspective, this can be very useful:
- A high R² suggests the market is moving in a more organized and statistically consistent way.
- A low R² suggests the session is more erratic, noisy, or less trend-friendly.
This means the R² label can act as a trend quality filter. Traders may prefer trend-following entries when R² is elevated and become more cautious when the fit is weak.
Settings Explained
- Polynomial Degree: Sets the complexity of the regression curve. Lower values create smoother and simpler trend lines, while higher values create more adaptive curves that can follow more detailed intraday shifts.
- Show Median Line: Displays a dashed midpoint line based on the daily high-low range (HL2). This can help traders gauge where price is trading relative to the center of the day’s range.
- Show R² Label: Shows the R-squared reading at the top of the daily session box so traders can quickly judge how well the regression curve fits current price action.
- Bullish Color: Defines the color used when the daily regression is signaling a positive session structure.
- Bearish Color: Defines the color used when the daily regression is signaling a negative session structure.
- Fill Transparency: Controls how visible the daily background box appears on the chart.
Why Traders Use the Daily Polynomial Regressions Indicator
This trading indicator can be useful for traders who want more than a standard moving average or trend line. Since it recalculates a polynomial regression inside each daily session, it provides a more session-specific view of price structure. That makes it valuable for:
- Intraday trend analysis
- Session-based mean reversion trading
- Momentum confirmation
- Identifying orderly versus chaotic market conditions
- Visualizing price curvature rather than only straight-line direction
For traders building an intraday trading strategy, the Daily Polynomial Regressions indicator can be used alongside volume tools, volatility tools, support and resistance, or price action confirmation to improve timing and market context.
FAQ
What does the Daily Polynomial Regressions indicator do?
It fits a polynomial regression curve to the current trading day’s price action so traders can better understand trend direction, trend strength, and potential mean reversion areas during the session.
How is this different from a moving average?
A moving average smooths price using past values, while this indicator builds a best-fit polynomial curve for the current session. That means it can better reflect curvature, acceleration, and changes in intraday structure.
Which polynomial degree should traders use?
Degree 1 is best for simple trend analysis, Degree 2 is useful for curved momentum shifts, and Degrees 3 to 4 are better for more complex intraday movement. Many traders start with lower degrees for cleaner signals and only increase complexity when needed.
What does a high R² value mean?
A high R² means the day’s price action is tracking the regression curve closely. This usually points to a cleaner and more organized market structure, which can be helpful for trend traders.
Does the Daily Polynomial Regressions indicator repaint?
Yes. The fit for the current day may repaint because the regression updates as new intraday price data comes in.
How can I access the Daily Polynomial Regressions indicator?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.comTradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, CoinAPI. CBOE BZX real-time US equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

