Isotonic Regression Oscillator

Feb 16, 2026

Static chart image
Oscillators
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 Isotonic Regression Oscillator is an advanced trend strength indicator designed to measure the structural direction and complexity of price action using isotonic regression. By comparing non-decreasing and non-increasing regression fits calculated with the Pool Adjacent Violators Algorithm (PAVA), this trading indicator transforms price structure into a normalized oscillator between -100 and 100. The result is a powerful tool for identifying dominant trend bias, detecting structural shifts, and quantifying how “step-like” or persistent a market move truly is.

Note: The isotonic regression fit displayed on the price chart is subject to repainting and is shown retrospectively to reflect the most recent calculation window.

How to Trade the Isotonic Regression Oscillator?

This trading strategy tool combines two components:

  • A normalized oscillator ranging from -100 to 100
  • A visual isotonic regression fit line plotted directly on price

Together, they provide both directional bias and structural context for market analysis.

Understanding the Oscillator Signals

The oscillator compares two competing monotonic models:

  • A non-decreasing (bullish) regression fit
  • A non-increasing (bearish) regression fit

Whichever model produces the lower Mean Squared Error (MSE) becomes the dominant structural interpretation.

Positive Values (Bullish Bias)

  • The non-decreasing fit has a lower MSE than the bearish fit.
  • Price is better explained by a structured upward progression.
  • Higher positive values suggest a multi-step bullish structure with increasing complexity.

This is particularly useful for confirming bullish trend continuation strategies or filtering long entries in trending markets.

Negative Values (Bearish Bias)

  • The non-increasing fit has a lower MSE.
  • Price structure is better explained by a downward monotonic sequence.
  • Larger negative values reflect a more structured bearish move.

Traders can use this as confirmation for short setups or as a trend filter for systematic trading strategies.

Zero Crosses (Trend Bias Shift)

When the oscillator crosses above or below zero:

  • The dominant regression model changes.
  • Market structure shifts from bullish to bearish (or vice versa).
  • This can act as an early signal of a potential regime change.

Unlike simple moving average crossovers, this signal is based on structural fit rather than smoothing lag.

Measuring Trend Complexity with Fit Pools

One of the most unique aspects of this trading indicator is that it doesn’t just measure direction — it measures structural complexity.

The oscillator magnitude is based on the number of “pools” (constant segments) formed during the PAVA process:

  • Values near ±100 → Highly granular, step-like trend structure.
  • Values near 0 → Simple, flat, or nearly linear monotonic structure.

In practical terms:

  • High absolute readings indicate strong structural persistence.
  • Low readings indicate weak structure or transitional price behavior.

This makes the indicator especially powerful for distinguishing between:

  • Clean trends
  • Choppy consolidations
  • Structural breakouts

Technical Breakdown of the Indicator

The Pool Adjacent Violators Algorithm (PAVA)

Isotonic regression forces a sequence to be either:

  • Non-decreasing (bullish fit), or
  • Non-increasing (bearish fit)

The script implements the Pool Adjacent Violators Algorithm (PAVA), which works as follows:

  1. Scan through price data in the selected lookback window.
  2. If two adjacent values violate the monotonic constraint:
    • They are pooled together.
    • Their average replaces both values.
  3. The process repeats until the entire sequence satisfies the constraint.

This produces the closest monotonic sequence to the original data.

Compared to moving averages or polynomial regression, isotonic regression adapts to step-like price behavior without assuming smooth curvature.

MSE-Based Model Selection

For every bar:

  • A non-decreasing regression is calculated.
  • A non-increasing regression is calculated.
  • The Mean Squared Error (MSE) of both fits is computed.

The model with the lower MSE is selected as the dominant structural interpretation.

This objective selection mechanism removes directional bias and allows the trading indicator to adapt dynamically to current market structure.

Normalized Complexity Formula

The oscillator is normalized using:

((Number of Pools - 1) / (Period - 1)) * 100

This formula converts structural complexity into a standardized scale between:

  • 0 to +100 for bullish fits
  • 0 to -100 for bearish fits

The normalization ensures consistency across different timeframes and assets, making it suitable for:

  • Forex trading
  • Crypto trading
  • Stock market analysis
  • Futures and indices

Trading Strategy Applications

The Isotonic Regression Oscillator can be used in multiple ways:

  • Trend Filter: Only take long trades when oscillator > 0 and short trades when < 0.
  • Strength Confirmation: Look for extreme readings to confirm strong directional momentum.
  • Regime Detection: Use zero-line crossovers to identify structural trend shifts.
  • Structure Analysis: Compare oscillator magnitude across timeframes to detect multi-timeframe alignment.

Because it measures structural complexity rather than volatility or simple momentum, it pairs well with:

  • Breakout strategies
  • Market structure trading systems
  • Price action confirmation tools
  • Volatility-based risk management

SETTINGS

The indicator is designed to remain flexible across different trading styles and markets.

  • Period: Defines the lookback window used to compute isotonic regression fits.

    • Shorter periods → More reactive signals
    • Longer periods → More stable structural readings
  • Source: The price series used for calculations (default: Close).

Style Customization

  • Bullish Color: Applied when the bullish fit dominates.
  • Bearish Color: Applied when the bearish fit dominates.
  • Fit Line Width: Controls regression line thickness.
  • Fit Line Style: Choose between Solid, Dashed, or Dotted visualization.

These styling options allow traders to integrate the indicator seamlessly into existing chart templates.

Frequently Asked Questions (FAQ)

What makes the Isotonic Regression Oscillator different from traditional trend indicators?

Unlike moving averages or momentum oscillators, this trading indicator evaluates structural monotonic fits using isotonic regression. It measures how well price conforms to a non-decreasing or non-increasing model, providing a deeper view of trend persistence and complexity.

Does the regression fit repaint?

Yes. The visual isotonic regression line is calculated over a rolling lookback window and is displayed retrospectively. However, the oscillator values themselves are computed consistently for each bar.

Is this suitable for all markets?

Yes. The normalization process allows the oscillator to be used across stocks, crypto, forex, and futures markets on multiple timeframes.

How do I access the Isotonic 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.