All indicators

Phase Regression Oscillator

By LuxAlgoFeb 16, 2026

Static chart image
OscillatorsCycle

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.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.