# Centerline Regime

Centerline Regime is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Reads the regime from which side of its midline an oscillator occupies (RSI, Stochastic, CCI, CMO, TSI, ROC or MACD), with an adaptive neutral band and a run of confirmation closes so single pokes across the line never flip it. Candles take the regime color, flips are tagged on price, and midline holds mark pullbacks that stall at the centerline and turn back with the regime.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 4, 2026.
- Access: free.
- Concepts: [centerline regime](https://www.luxalgo.com/library/concept/centerline-regime/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=yu6tlwhei6rtwz39l2rhaevi
- Page: https://www.luxalgo.com/library/indicator/centerline-regime/

The **Centerline Regime** is a sophisticated trend-following tool that categorizes market momentum by evaluating the position of popular oscillators relative to their central equilibrium. By employing a dynamic neutral zone, this indicator filters out minor fluctuations, allowing traders to distinguish between significant shifts in momentum and market noise. It provides a structured framework for identifying bullish and bearish regimes, highlighting confirmation points and potential trend continuation signals that traditional oscillators often fail to isolate.

## How to Trade the Centerline Regime?

The indicator works by defining a neutral band around an oscillator midline (such as 50 for RSI or 0 for MACD/CCI). A regime flip only triggers when the oscillator sustains its position outside this band for a user-defined number of closes, preventing false signals in ranging markets.

* **Identifying Trends:** When the oscillator breaks above the upper edge of the neutral band and sustains that position, a bull regime is signaled. Conversely, a drop below the lower edge indicates a bear regime. Wait for the label to appear on the chart as confirmation before looking for entries in the direction of the trend.
* **Midline Holds:** These are key continuation signals. A midline hold occurs when the oscillator, having established a strong regime, pulls back toward the neutral band but finds support or resistance at the midline before continuing in the direction of the dominant trend. These moments often provide high-probability opportunities to add to existing positions.
* **Evaluating Conflicts:** The dashboard includes a price check feature that warns you if the current regime disagrees with the price relative to a fast-moving average. If you see a conflict, it suggests that momentum is likely weakening, which may be a signal to tighten stops or reduce exposure.

## Centerline Regime Settings

### Oscillator
* **Oscillator:** Select the momentum tool used to define the regime (RSI, Stochastic, CCI, CMO, TSI, ROC, or MACD).
* **Source:** The data input for the oscillator calculation (the Stochastic always uses close, high and low).
* **Length:** The primary lookback period for the chosen oscillator.
* **MACD/TSI Inputs:** Specialized lengths to configure the sensitivity of the MACD or True Strength Index options.

### Regime
* **Neutral Band:** Toggle between Adaptive (scaled to historical volatility) and Fixed (custom unit-based) modes to define the width of the neutral zone.
* **Adaptive/Fixed Width:** Adjusts the sensitivity of the neutral band. A wider band requires stronger momentum for a regime flip.
* **Swing Window:** The number of bars used to calculate the adaptive band width and the occupancy statistics.
* **Confirmation Closes:** Determines how many consecutive bars the oscillator must remain outside the band to confirm a new regime.
* **Price Check EMA:** The EMA length used to compare the trend regime against actual price action for potential conflicts.

### Midline Holds
* **Show Midline Holds:** Toggles the display of pullback signals that represent momentum-side continuations.
* **Minimum Stretch:** The distance the oscillator must travel beyond the midline before a pull-back can qualify as a valid hold.

### Style
* **Color Candles by Regime:** Paints candles based on the current detected trend, graying them out during contested periods.
* **Regime Flip Labels:** Toggles the labels on the chart that mark the exact moment a new trend is confirmed.

### Dashboard
* **Show Dashboard:** Enables a data table providing real-time stats including time in the current regime, the operating range, and the percentage of time spent above the midline.

## Frequently Asked Questions

### What is the purpose of the neutral band?
The neutral band acts as a buffer zone around the midline, preventing the indicator from flipping regimes during minor sideways price movements. This reduces noise and ensures that only significant shifts in momentum result in a change of state.

### What is the difference between Adaptive and Fixed modes?
Adaptive mode automatically sizes the neutral band based on the oscillator's recent historical swings, allowing the indicator to adjust to varying levels of market volatility. Fixed mode keeps the buffer constant, which is useful for traders who prefer a static threshold for regime validation.

### How should I interpret a contested regime?
A contested regime occurs when the oscillator crosses the midline against the current established trend and the flip has not yet been confirmed by the required number of closes beyond the far edge of the neutral band. This often indicates a loss of momentum or the early stages of a potential trend reversal.

## Related indicators

- [Oscillator Matrix](https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix.md
- [RSI Divergence: Out-of-Sample Optimizer](https://www.luxalgo.com/library/indicator/rsi-divergence-out-of-sample-optimizer/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/rsi-divergence-out-of-sample-optimizer.md
- [HTF Reversal Divergences](https://www.luxalgo.com/library/indicator/htf-reversal-divergences/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/htf-reversal-divergences.md
- [Divergence Variants & Confirmation](https://www.luxalgo.com/library/indicator/divergence-variants-and-confirmation/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/divergence-variants-and-confirmation.md
- [Hidden Divergence](https://www.luxalgo.com/library/indicator/hidden-divergence/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/hidden-divergence.md
- [RSI Candlestick Oscillator](https://www.luxalgo.com/library/indicator/rsi-candlestick-oscillator/) (Overbought/oversold): markdown at https://www.luxalgo.com/library/indicator/rsi-candlestick-oscillator.md
- [Adaptive Bounds RSI](https://www.luxalgo.com/library/indicator/adaptive-bounds-rsi/) (Overbought/oversold): markdown at https://www.luxalgo.com/library/indicator/adaptive-bounds-rsi.md
- [Momentum Expansion vs Contraction](https://www.luxalgo.com/library/indicator/momentum-expansion-vs-contraction/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/momentum-expansion-vs-contraction.md

---

Source: https://www.luxalgo.com/library/indicator/centerline-regime/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
