PROTECTED SOURCE SCRIPT
Cập nhật Gaussian Ribbon

Summary
Adaptive Gaussian ribbon with inner/outer sigma bands and soft regime colors—green trend, red pressure, gray neutral.
What it is
A clean Gaussian filter ribbon that maps trend + volatility without the jitter. It uses a Gaussian smoother, a tiny EMA basis, and two standard-deviation bands. Color fades with distance from the basis, and flips softly (no knife-edge).
How it works
What “Regime” Means (Simple)
A regime is the market’s “weather.” It shifts between Bull, Neutral, and Bear. Different tactics work in each.
How this indicator detects regime
Playbook (What to do)
For Pros (Tuning & Confirmation)
How to read it
Good starting presets
Options
Why it’s “safe”
Limitations
It’s a context tool. It will lag at regime turns (by design). Use structure/volume to time entries.
Credits
Script by Jason Cayen. Gaussian smoothing is classic DSP math (public domain).
Release notes (v1.0)
Initial public release: faded bands, neutral zone, soft regime colors, Non-repainting; pane by default.
Adaptive Gaussian ribbon with inner/outer sigma bands and soft regime colors—green trend, red pressure, gray neutral.
What it is
A clean Gaussian filter ribbon that maps trend + volatility without the jitter. It uses a Gaussian smoother, a tiny EMA basis, and two standard-deviation bands. Color fades with distance from the basis, and flips softly (no knife-edge).
How it works
- Gaussian core: IIR-style smoothing on your chosen source (default hlc3).
- Basis: EMA(3) of the Gaussian for a steadier slope.
- Bands: Inner = Basis ± (σ × Inner Mult), Outer = Basis ± (σ × Outer Mult).
- Regime: z-score → softsign → EMA(3) → bull / neutral / bear.
- Faded look: opacity ramps with distance; neutral turns gray.
What “Regime” Means (Simple)
A regime is the market’s “weather.” It shifts between Bull, Neutral, and Bear. Different tactics work in each.
How this indicator detects regime
- Builds a smoothed score of price vs. the basis (z-score → softsign → EMA).
- Score > 0 = Bull, score < 0 = Bear. Inside the inner band = Neutral filter to cut noise.
- Color changes are soft (faded) so flips don’t knife-edge.
Playbook (What to do)
- Bull (Green): Buy pullbacks to the inner band; add on strength; cut fast if price falls back inside the ribbon.
- Neutral (Gray): Reduce size, fade extremes, or stand down. Wait for a clean break in either direction.
- Bear (Red): Sell/short rallies to the ribbon; protect capital; flip long only after a confirmed regime turn.
For Pros (Tuning & Confirmation)
- Timeframe bias: Use higher TF (1W/2W) for context; trade on 1D/4H in the higher-TF direction.
- Smoother vs faster: Increase Length to reduce flip-flop; decrease for earlier turns.
- Vol filter: Widen Outer/Inner multipliers in choppy markets; narrow in strong trends.
- Confirm: Use structure (HH/HL vs LH/LL), volume/OBV, or your MA; ribbon = context, not a standalone trigger.
How to read it
- Green = trend support; pullbacks to the inner band are typical buy-the-dip zones.
- Gray = inside ribbon; chop/mean reversion. Size down or wait.
- Red = trend pressure; rallies into ribbon are fade zones until regime flips.
- Opacity increases with distance = stronger momentum.
Good starting presets
- Macro (1W–2W): Length 90–110, Outer 2.3, Inner 1.3, Source hlc3.
- Swing (1D): Length 60–80, Outer 2.0, Inner 1.4.
- Intraday (1–4H): Length 30–40, Outer 1.8, Inner 1.2.
Options
- Opens in a separate pane (overlay=false). Set overlay=true to place on candles (consider +5 transparency on fills).
- Watermark is “CAYEN” (table-based, no editor drama).
Why it’s “safe”
- No repaint. No lookahead; uses only closed-bar data.
- Deterministic state and divide-by-zero guards.
Limitations
It’s a context tool. It will lag at regime turns (by design). Use structure/volume to time entries.
Credits
Script by Jason Cayen. Gaussian smoothing is classic DSP math (public domain).
Release notes (v1.0)
Initial public release: faded bands, neutral zone, soft regime colors, Non-repainting; pane by default.
Phát hành các Ghi chú
SummaryAdaptive Gaussian ribbon with inner/outer sigma bands and soft regime colors—green trend, red pressure, gray neutral.
What it is
A clean Gaussian filter ribbon that maps trend + volatility without the jitter. Uses a Gaussian smoother, a tiny EMA basis, and two standard-deviation bands. Colors fade with distance from the basis, and flips are softened (no knife-edge).
How it works
- Gaussian core (IIR) on your source (default hlc3).
- Basis = EMA(3) of the Gaussian.
- Bands: Inner = Basis ± (σ × Inner Mult), Outer = Basis ± (σ × Outer Mult).
- Regime = z-score → softsign → EMA(3): bull / neutral / bear.
- Neutral filter inside the inner band; opacity ramps with distance.
How to read
- Green: trend support—pullbacks to inner band = buy-the-dip zones.
- Gray: inside ribbon—expect chop/mean reversion; trade lighter or wait.
- Red: trend pressure—rallies to the ribbon are fade zones until flip.
Good starting presets
- Macro (1W–2W): Length 90–110, Outer 2.3, Inner 1.3, Source hlc3.
- Swing (1D): Length 60–80, Outer 2.0, Inner 1.4.
- Intraday (1–4H): Length 30–40, Outer 1.8, Inner 1.2.
Safety
No repaint (closed-bar only). Deterministic state with divide-by-zero guards.
Limitations
Context tool—will lag at regime turns by design. Confirm with structure/volume.
Phát hành các Ghi chú
Gaussian RibbonA refined Gaussian-style volatility ribbon built for clarity and smoothness.
This version focuses on stability, soft visual fades, and minimal noise — ideal for traders who want to see market regime shifts without clutter.
Features
Gaussian-smoothed core with dual inner/outer bands
Auto-balanced color fade between bull and bear phases
Neutral detection when price is within inner deviation zone
Gentle transparency gradients (no harsh color jumps)
Optional basis line with shadow for center tracking
Fully non-repainting, lightweight, and works on all timeframes
How to Use
Green = bullish pressure building.
Red = bearish pressure building.
Neutral tone = price stabilizing near the Gaussian mean.
Use as a visual trend-filter or confluence layer with your favorite momentum or volume indicator.
Crafted by Cayen — built for precision, designed for flow.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể sử dụng tự do và không giới hạn – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.