OPEN-SOURCE SCRIPT

Sentinel Cascade [JOAT]

1 398
Sentinel Cascade [JOAT]

Sentinel Cascade is a three-stage adaptive Supertrend overlay. Where a classic Supertrend uses one fixed-ATR band, this script chains three Supertrend stages on top of each other and modulates each stage's width with a different regime signal. Bands tighten when the market is trending cleanly and widen when volatility expands or behavior turns mean-reverting.

cuplikan

What makes it different
  • A standard Supertrend gives one binary direction state. Sentinel Cascade gives three nested direction states that act like a confluence stack. Alignment of all three is the highest-conviction read.
  • The ATR feeding the Supertrend is smoothed through a Kaufman Efficiency Ratio. Trend-efficient periods get a faster ATR response. Choppy periods get a slower response.
  • Stage 2's width scales with a volume Z-score. High-volume bars widen the band so transient noise is less likely to flip the stage.
  • Stage 3's width scales with a lightweight two-point Hurst estimator (R/S over short and long windows). Trending Hurst above 0.5 widens. Mean-reverting Hurst below 0.5 tightens.
  • A Sentinel pulse fires only when Stage 3 flips AND Stage 2 confirms the new direction within three bars. A coincidence filter for higher-quality regime shifts.


How it works
  1. Compute a basis price as the midpoint of the recent highest high and lowest low.
  2. Compute a KAMA-smoothed ATR from the basis.
  3. Build Stage 1 as a Supertrend on the basis using the KAMA-ATR and the Stage 1 factor.
  4. Build Stage 2 as a Supertrend on Stage 1's output, with its factor multiplied by a clamped volume-Z modulator.
  5. Build Stage 3 as a Supertrend on Stage 2's output, with its factor multiplied by a clamped Hurst modulator.
  6. Track the Sentinel pulse, the ATR-percentile regime (squeeze / normal / expansion), and a running count of intraday Stage 3 flips.


Reading the chart
  • Three stacked trend lines. Stage 1 thickest, Stage 3 thinnest. Colors flip between bull and bear on direction changes.
  • A gradient ribbon between Stage 1 (or Stage 2 by user choice) and Stage 3 brightens when the stack is spread, fades when it converges.
  • An optional iridescent candle recolor scales tint with distance from Stage 3.
  • A horizontal sight-line projects Stage 3's current level back into history so past respect or rejection at that level is visible.
  • Persistent flip markers record each Stage 3 flip and retroactively append an OK or FAIL tag after a user-defined persistence window.
  • A right-edge state block summarizes alignment of all three stages plus the ATR squeeze and expansion read.


Signals
  • Stage 3 bull / bear shift (any flip)
  • Cascade alignment (all three stages agree)
  • Stage 2 retest / bounce inside an active trend
  • ATR squeeze and expansion entry (percentile-based)

All signals are gated on barstate.isconfirmed or barstate.ishistory. No future-bar referencing. No lookahead_on.

Inputs
  • Cascade: range basis length, ATR period, KAMA efficiency length, Stage 1 / 2 / 3 factors.
  • Regime: volume-Z lookback, Hurst short / long windows.
  • Visual: bullish color, bearish color, toggles for ribbon, sentinel pulse, iridescent candles, bounce markers, ribbon anchor.
  • On-chart: stage value labels, flip timeline labels, squeeze background tint, Stage 3 cloud, sight-line, state block, daily flip counter.
  • Dashboard: position, size, watermark row.


How traders use this
  • Trend continuation: take in the direction of Stage 3 when price retests Stage 2 from the trending side.
  • High-conviction entries: wait for cascade alignment (all three stages agree) before sizing up.
  • Mean-reversion fades: when Hurst is clearly below 0.5 and a Stage 3 flip prints near recent extremes, the new trend is statistically less likely to persist.
  • Volatility context: ATR percentile regime tells you whether the move is happening in a compressed, normal, or extended volatility environment. Sizing should account for that.


Limitations
  • The two-point Hurst estimator is a fast approximation, not the full rescaled-range statistic. It is monotonically meaningful but is not a precise persistence coefficient.
  • Like every Supertrend variant, this is a trend-following construct. It is best on instruments with clear directional regimes and worst in extended choppy ranges.
  • Pivots and percentile-based regime classifications need warm-up bars before their values stabilize.
  • Past behavior is not a guarantee of future behavior. No indicator can remove market uncertainty.


Compatibility
Pine Script v6, single-file open-source indicator. Works on any symbol and any timeframe. Uses no request.security calls. Non-repainting beyond the normal Supertrend right-bar reactivity inherent to band ratchet logic.

Defaults
Mint bullish color, red bearish color, top-right medium dashboard, all on-chart visualizations on. Open the inputs panel to tune for your instrument or to declutter for screenshots.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.