Phase Regression Oscillator

Feb 16, 2026

Static chart image
Oscillators
Cycle
Works on the following platforms:
tradingviewSymbolTradingView
For free use on the TradingView platform
ninjatraderNinjaTrader
For free use on the NinjaTrader platform
metatrader4MetaTrader 4/5
For free use on the MetaTrader 4/5 platform
thinkorswimThinkorswim
For free use on the Thinkorswim platform

The Phase Regression Oscillator is an advanced trading indicator built for traders who want a precise, mathematically grounded view of market cycles. Instead of relying on traditional momentum formulas, this indicator uses linear least squares regression to fit a sine wave directly to price data. The result is a high-resolution oscillator that reveals the instantaneous phase of a dominant cycle, helping traders identify peaks, troughs, and potential turning points with exceptional clarity.

By solving a system of equations on every bar, the indicator continuously estimates the best-fit sine wave for a rolling window. This makes it a powerful cycle analysis tool and a refined trading strategy component for traders who focus on market rhythm, timing, and structural phase transitions.

How to Trade the Phase Regression Oscillator

This trading indicator is designed to identify where price currently sits within its cyclical structure. By fitting a theoretical sine wave to recent price data, it reveals whether the market is in an advancing phase, peaking phase, declining phase, or troughing phase.

Unlike traditional oscillators such as RSI or stochastic indicators that measure price relative to recent highs and lows, the Phase Regression Oscillator mathematically extracts the cycle phase using regression. This makes it particularly useful for:

  • Identifying cyclical reversals
  • Confirming trend exhaustion
  • Timing entries within established trends
  • Building systematic trading strategies based on cycle structure

Interpreting the Oscillator Components

Understanding the components of this cycle-based trading indicator is key to using it effectively.

  • Sine Oscillator (Solid Line):
    This is the primary signal line.

    • When positive and green, the market is in an ascending or peaking cycle phase.
    • When negative and red, the market is in a descending or troughing phase.

    Crosses above or below the zero line often mark structural phase transitions, which traders can use as potential entry or exit signals.

  • Cosine Component (Dotted Line):
    This is the quadrature (in-phase) component of the cycle. The relationship between the sine and cosine lines reveals momentum shifts within the cycle.
    When the sine line begins to lose separation from the cosine line, it may indicate a weakening cycle and an approaching turning point.

  • Overbought and Oversold Levels:
    Dashed horizontal thresholds highlight extreme phase synchronization.
    When the oscillator reaches these levels, the cycle fit is near its theoretical peak or trough, often preceding a phase rotation or reversal. These levels can be integrated into a mean-reversion trading strategy.

The Mathematical Foundation Behind This Trading Indicator

At its core, the Phase Regression Oscillator models price using a trigonometric regression equation:

y = a·sin(ωx) + b·cos(ωx) + c

Instead of performing a brute-force search to estimate the phase, the indicator uses an analytical Linear Least Squares solution. Specifically:

  • A 3×3 system of normal equations is solved on every bar.
  • Cramer's Rule is applied to compute the coefficients a, b, and c.
  • The instantaneous phase (φ) is extracted using the arctangent of the sine and cosine coefficients.

This approach ensures:

  • High computational efficiency
  • Stable coefficient estimation
  • Minimal lag relative to conventional smoothing oscillators
  • A mathematically optimal cycle fit for the chosen window

By defining the cycle period as a percentage of the window size, the trading indicator dynamically adapts to different timeframes and markets. Whether applied to forex, crypto, equities, or futures, the regression remains proportional to the chosen lookback window.

Why Use a Regression-Based Cycle Trading Strategy?

Traditional oscillators often respond to price extremes. In contrast, this indicator extracts the underlying cyclical structure mathematically.

Benefits include:

  • Reduced reliance on arbitrary thresholds
  • More accurate phase detection
  • Clear visualization of cycle transitions
  • Adaptability across asset classes and timeframes
  • Integration into systematic algorithmic trading strategies

Traders can use it as:

  • A standalone cycle timing tool
  • A trend filter combined with moving averages
  • A reversal confirmation tool
  • A signal generator inside multi-indicator trading systems

SETTINGS

Main Settings

  • Window Size (N):
    Defines the rolling lookback period used to calculate the regression fit. Larger values produce smoother cycles, while smaller values increase responsiveness.

  • Period % of Window:
    Sets the sine wave period as a percentage of the Window Size.

    • 100% means the cycle length equals the window length.
    • Lower percentages search for shorter internal cycles within the same window.

This flexibility allows traders to tune the oscillator for short-term scalping strategies or longer-term swing trading approaches.

Levels

  • Overbought Level:
    Upper threshold identifying potential cycle peaks and exhaustion zones.

  • Oversold Level:
    Lower threshold identifying potential cycle troughs and reversal zones.

These levels can be customized based on asset volatility and strategy preferences.

Style

  • Bullish Color: Applied when the oscillator is positive, including oversold levels and upward gradient fill.
  • Bearish Color: Applied when the oscillator is negative, including overbought levels and downward gradient fill.
  • Cosine Color: Controls the dotted quadrature reference line.
  • Zero Line Color: Defines the center baseline for phase transitions.

Integrating the Phase Regression Oscillator Into Your Trading Plan

This trading indicator works especially well in:

  • Cyclical markets with visible rhythm
  • Range-bound environments
  • Trend continuation setups where pullbacks align with cycle troughs
  • Algorithmic and quantitative trading systems requiring phase detection

For best results, traders may combine it with:

  • Trend filters (e.g., moving averages)
  • Volatility measures
  • Market structure analysis
  • Volume confirmation tools

By aligning cycle phase with broader market context, traders can significantly improve timing precision.

FAQ

What makes the Phase Regression Oscillator different from other trading indicators?

Unlike standard oscillators that rely on smoothing or bounded momentum formulas, this indicator uses linear least squares regression to extract the mathematical phase of a fitted sine wave. This provides a more direct measurement of the market’s cyclical state.

Is this trading indicator suitable for all markets?

Yes. Because the period is defined relative to the window size, the indicator adapts well across forex, crypto, equities, and futures markets on multiple timeframes.

How do I access the Phase Regression Oscillator?

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.