OPEN-SOURCE SCRIPT

Meridian Stochastic Regime Suite [JOAT]

578
Meridian Stochastic Regime Suite [JOAT]

Introduction

Meridian Stochastic Regime Suite is an open-source adaptive oscillator built for traders who want more context than a standard stochastic line can provide. The script combines a centered stochastic engine, an adaptive response model, and a regime profile so the oscillator changes character as the market shifts between trend, compression, expansion, and balance.

The problem Meridian solves is signal quality. Standard oscillators often look clean, but they do not explain whether momentum is occurring inside a compressed market, an expanding breakout phase, or a stable trend. Meridian adds that context directly into the oscillator architecture so the same reading can be interpreted differently depending on the active regime profile.

snapshot

Core Concepts

1. Centered stochastic architecture

Price is pre-smoothed first, then converted into a stochastic reading that is centered around 50 so directional pressure is easy to interpret:

Pine Script®
smoothHigh = ta.ema(high, priceSmoothLen) smoothLow = ta.ema(low, priceSmoothLen) smoothClose = ta.ema(close, priceSmoothLen) rawStoch = 100.0 * (smoothClose - ta.lowest(smoothLow, stochLen)) / stochRange


2. Adaptive response engine

The main oscillator does not use static smoothing alone. Its response speed and gain expand or contract based on the regime profile:

Pine Script®
gainBias = gainBase + trendScore * 0.38 + expansionScore * 0.18 - compressionScore * 0.12 speedBias = responseBase + trendScore * 0.08 + expansionScore * 0.04 adaptiveOsc := adaptiveOsc[1] + speedBias * (adaptiveSeed - adaptiveOsc[1])


This helps the oscillator respond differently in directional and compressed conditions.

3. Embedded regime scoring

Meridian computes four internal state scores:

  • Trend
  • Compression
  • Expansion
  • Balance


Those scores are derived from ATR behavior, path efficiency, and slope strength, then normalized into a regime profile shown in the dashboard.

4. Spread and signal layer

The script compares the adaptive oscillator to a slower signal line and visualizes the spread around the neutral axis. This gives a direct view of acceleration versus drag.

5. Institutional oscillator panel

The panel uses restrained zones, layered fills, and a top-right dashboard instead of loud markers. The result stays readable while still carrying multiple analytical dimensions.

snapshot

Features

  • Centered stochastic core: Keeps the oscillator readable around a neutral midpoint
  • Adaptive response model: Gain and speed shift with the internal regime profile
  • Four-state regime map: Trend, Compression, Expansion, and Balance
  • Fast line and signal line: Shows momentum acceleration versus stabilization
  • Spread shading: Highlights when the adaptive oscillator is separating from the signal line
  • Regime dashboard: Displays state, confidence, adaptive reading, signal reading, and regime profile shares
  • Confirmed-bar flips: Internal state transitions are tracked on closed bars
  • Non-repainting design: Uses only current-timeframe data and no future references


Input Parameters

Stochastic Core:
  • Price Pre-Smoothing
  • Stochastic Length
  • Fast Smoothing
  • Adaptive Signal Smoothing


Regime Filter:
  • Regime Window
  • ATR Window
  • Base Oscillator Gain
  • Base Response Speed


Visual Output:
  • Show Adaptive Zones
  • Show Centered Fast Line


How to Use This Indicator

Step 1: Start with the regime
Read the dashboard first. Trend and Expansion regimes support directional interpretation. Compression and Balance call for more caution.

Step 2: Watch adaptive versus signal spread
When the adaptive line separates cleanly from the signal line, momentum is strengthening. When the spread compresses, the move is losing urgency.

Step 3: Use the centered fast line as timing context
The fast line helps show whether short-term momentum is leading or lagging the adaptive engine.

Step 4: Avoid isolated readings
Meridian is strongest when used alongside a structure or value-based tool rather than as a standalone trade trigger.

Indicator Limitations

  • Like all oscillators, Meridian can remain elevated or depressed during strong directional trends
  • Compression states may delay re-acceleration readings until volatility expands again
  • The regime profile is descriptive, not predictive


Originality Statement

Meridian Stochastic Regime Suite is original in how it embeds a four-state regime profile directly into the adaptive behavior of a centered stochastic engine. It is published because:

  • The oscillator response changes with internal market-state measurements instead of using only fixed smoothing
  • The script surfaces trend, compression, expansion, and balance as percentages inside the same panel
  • The panel and dashboard design turn regime context into an interpretable momentum framework rather than a generic stochastic clone


Disclaimer

This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to trade. Oscillator readings can remain extreme for extended periods, and regime classifications can shift as conditions evolve. Always use independent judgment and proper risk management.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.