PROTECTED SOURCE SCRIPT

Supertrend Dual-Zone Channel V2

167
**Supertrend Dual-Zone Channel V2**
Advanced Supertrend with Dual-Zone Visualization, Breakout Counter, and Dynamic Labels

A powerful upgrade to the classic Supertrend indicator that displays two distinct zones:
• Bullish Channel (green): Active when price is above the Supertrend line
• Bearish Channel (red): Active when price is below the Supertrend line

Key Features
• Dual-Zone Fill System: Clearly separates bullish and bearish regimes with semi-transparent channel fills for instant trend context.
• Reverse Tracking Lines: Shows the opposite-direction Supertrend band (faint green/red lines) to highlight potential reversal zones.
• Automatic Breakout Counter: Counts consecutive breaks into the opposite tracking band.
- Green labels below bars: Bullish breakouts (price closes above bearish tracking line while in uptrend)
- Red labels above bars: Bearish breakouts (price closes below bullish tracking line while in downtrend)
• Clean Label Management: Uses arrays to store labels with tooltips showing breakout sequence number.
• Mid-Channel Reference: Invisible midline based on (high + low)/2 for internal fill logic (not plotted).

How to Use
• Strong Trend Confirmation: Price staying within its colored channel = healthy trend.
• Pullback Entries: Look for price touching the faint reverse tracking line without breaking it.
• Breakout Signals: Labeled breakouts (1st, 2nd, 3rd...) often precede trend exhaustion or acceleration.
• Works on all timeframes and assets.

Inputs
• Factor (default: 3.0) – Sensitivity of the Supertrend bands
• ATR Period (default: 10) – Lookback period for volatility calculation

Visuals
• Thick green/red line: Current active Supertrend
• Faint opposite-color line: Reverse tracking band
• Light green/red fills: Bullish/Bearish zones
• Numbered labels: Sequential breakout counter

Fully optimized with max_lines_count=500 and max_labels_count=500.
Clean, lightweight, and highly readable on chart.

Version 2 – Improved labeling, better zone separation, and smarter counter reset on trend change.

Perfect for trend-following, pullback trading, and spotting potential reversals.

Happy trading!
====================================================================================
**Supertrend 双区通道 V2**
高级超级趋势指标:双色通道可视化 + 突破计数器 + 动态标签

经典 Supertrend 的强力升级版,通过 **双区通道** 直观区分多空状态:
• 多头通道(绿色):价格位于 Supertrend 上方时激活
• 空头通道(红色):价格位于 Supertrend 下方时激活

### 核心功能
• 双区填充系统:半透明通道填色,一眼分辨当前多空主导区域
• 反向轨道线:显示对立方向的 Supertrend 带(淡绿/淡红虚线),清晰标记潜在反转区域
• 自动突破计数器:统计价格连续突破反向轨道的行为
- 绿色标签(K线下方):多头突破(多头趋势中收盘突破空头轨道)
- 红色标签(K线上方):空头突破(空头趋势中收盘跌破多头轨道)
• 智能标签管理:使用数组存储标签,带工具提示显示突破序号
• 通道中轴:基于 (high + low)/2 的隐形中线,仅用于填充逻辑(不显示)

### 使用方法
• 趋势健康:价格始终停留在同色通道内 = 强势趋势
• 回调入场:价格触及淡色反向轨道但未突破 = 优质回调机会
突破信号:连续编号突破(第1次、第2次…),根据不同品种设定自定义的突破次数,btc通常五次突破后才会衰竭。
• 适用于所有周期、所有品种

### 输入参数
• 倍数(默认 3.0):控制 Supertrend 带的灵敏度
• ATR周期(默认 10):波动率计算周期

### 视觉元素
• 粗实线(绿/红):当前生效的 Supertrend 主线
• 细虚线(淡绿/淡红):反向轨道线
• 浅色填充:多头/空头通道区域
• 编号标签:突破序号(从0开始计数)

**V2 版升级**:优化标签逻辑、更好区域分隔、趋势切换时自动归零计数器。

祝交易顺利!

免责声明

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.