OPEN-SOURCE SCRIPT

Smart Gaussian Channel - Band & Breakout Statistics [Dots3Red]

624
🔔 GAUSSIAN CHANNEL AI — BAND & BREAKOUT STATISTICS [Dots3Red]
The Gaussian Channel is one of the most-followed tools, and this indicator goes a step further and keeps score: how often does each band actually hold, how often does a breakout genuinely continue, and how often has the filter's own direction call been right?


WHY THIS MATTERS
A smooth channel is only useful if you know how much to trust it. Most Gaussian Channel scripts leave that entirely to feel, but nothing tells you whether the upper band has actually been holding lately or getting run through. This script tracks three separate things continuously and reports them plainly:

📊 Band respect — "Upper Band: 58% rejected (n=33)"
📊 Breakout follow-through — "Breakouts ▲: 61% continued (n=18)"
📊 Flip win rate — did the filter's last direction change actually hold up?

Nothing here is a prediction. It is a running record of what has already happened on this specific chart, so you can judge the channel's current reliability instead of assuming it.


⚙️ HOW IT WORKS
🔔 The Gaussian filter — a proper Ehlers-style low-lag filter, cascaded through up to 4 poles for extra smoothness. The same cascade applied to true range sets the band width, scaled by a multiplier. This is standard signal-processing math — the same construction behind the well-known versions of this tool. It is a fixed formula, not a model that adapts on its own.

📏 Band respect grading — every time price wicks into a band without closing beyond it, that's logged as a touch. The script then watches what happens next: if price moves back away from the band by a meaningful distance, it's graded a rejection; if price later closes through, it's graded a break. The running percentage accumulates per band, separately for upper and lower.

🚀 Breakout follow-through grading — a genuine close beyond a band (not just a wick) starts a separate track: does price keep moving in that direction by a further meaningful distance, or does it fall back inside the channel? Measured independently for upward and downward breakouts, since a channel can behave very differently on each side.

🔄 Flip grading — every time the filter's direction turns, the turn is checked a set number of bars later: did price actually end up where the new direction implied? The running win rate is a direct, honest answer to "when this line flips, how often has it been right so far."

🔒 Non-repainting — all grading happens strictly on confirmed bars. Nothing here retroactively changes what already printed.


🧭 HOW TO USE
1️⃣ Read the band stats before assuming a level will hold. If the upper band shows "72% rejected (n=40)," that's a meaningfully different situation than "48% rejected (n=12)" — same-looking channel, very different track record.

2️⃣ Use breakout stats to judge whether a close beyond the channel deserves attention. A high continuation rate on breakouts in one direction, paired with a low one in the other, tells you this instrument doesn't behave symmetrically — worth knowing before treating both sides the same way.

3️⃣ Check the flip win rate as context, not a green light. A filter flip that's been correct 40% of the time recently deserves more skepticism than one running at 65%. The count (n=) tells you how much to trust that percentage itself.

4️⃣ Let the sample sizes build up. Early on a fresh chart, expect small n values and treat the percentages as provisional until they've accumulated real history.

5️⃣ Adjust the poles and sampling period to the timeframe. Fewer poles and a shorter period track price more closely with less lag; more poles and a longer period produce a smoother, slower-reacting channel. Neither is universally correct — it depends on how much noise you want filtered out.


🛠️ SETTINGS
🔔 Gaussian Filter
• Source, Sampling Period, Poles, Band Multiplier — the core filter construction

🎯 Statistics Engine
• Touch Tolerance, Rejection Distance — define what counts as a touch and a genuine rejection
• Breakout Continuation, Outcome Window — define what counts as real follow-through
• Flip Grading Window — how far ahead a direction flip is checked

🎨 Visualization
• Channel Fill toggle and transparency
• Touch / Breakout Markers toggle, with independent line widths and marker sizing

🎨 Colors
• Rising / Falling / Flat channel colors
• Independent touch-marker and breakout-marker colors for each side
• Full dashboard color control — background, borders, header, and the good/bad outcome indicators

🖥️ Dashboard
• Show/hide, position — current channel direction plus all three statistic layers in one place


📝 NOTES
The statistics are cumulative from when the indicator was added to the chart — they are not a backtest over the full available history unless you scroll back far enough for the script to process it. A small sample size on any row means that particular statistic is still developing; treat it accordingly.


⚠️ DISCLAIMER
This is an analytical and visualization tool. It does not generate trade signals and does not constitute financial advice. Historical band, breakout, and flip statistics do not guarantee future performance.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。