OPEN-SOURCE SCRIPT
已更新 Crypto Ultimate Indicator v2

═══════════════════════════════════════════════
CRYPTO ULTIMATE INDICATOR (CUI)
═══════════════════════════════════════════════
A multi-layer confluence system for crypto traders. Stacks 12+ independent technical layers — trend, momentum, volume, regime, multi-timeframe bias, and Smart Money Concepts — and fires Buy/Sell signals only when enough of them agree. Every signal comes with a confidence score, three take-profit levels, position size recommendation, and live outcome tracking.
Built for 4H and Daily crypto charts. No proprietary "secret sauce" — every component is documented and every input is exposed.
━━━━━━━ WHY THIS EXISTS ━━━━━━━
Most multi-indicator scripts stack correlated trend filters (more EMAs, more oscillators) and call it "confluence." That just adds the illusion of agreement without adding independent information.
CUI's filter stack is built from genuinely different signal sources, so when they align, that alignment carries real weight:
• Trend regime — HMA + Supertrend + EMA Ribbon
• Momentum — RSI with proper pivot-to-pivot divergence
• Volume flow — body-weighted Volume Delta + CVD divergence
• Volatility state — Bollinger squeeze + squeeze-release timing
• Market structure — composite of ADX, Choppiness Index, BB-width percentile
• Multi-timeframe — weighted Daily / Weekly / Custom HTF (all [1] offset, no repaint)
• Liquidity & gaps — Fair Value Gaps + Liquidity Sweep detection
• External context — optional BTC trend filter for alt trading
A Buy or Sell only fires when the relevant subset of these align. A built-in "Why-Not" diagnostic table shows you exactly which filter is blocking a near-signal at any moment — turning the indicator into a tunable system rather than a black box.
━━━━━━━ CORE FEATURES ━━━━━━━
TREND & MOMENTUM
▸ Hull Moving Average (configurable length)
▸ Supertrend with ATR factor
▸ 5-EMA Ribbon (8/13/21/34/55) with stacking score
▸ RSI with consecutive-pivot divergence detection
▸ MACD and Stochastic RSI (data window)
VOLUME
▸ Body-weighted Volume Delta (not naive close-position)
▸ Cumulative Volume Delta (CVD)
▸ CVD divergence at confirmed pivots
VOLATILITY & REGIME
▸ Bollinger Bands with squeeze detection and release timing
▸ Composite regime classifier (ADX × CHOP × BB-width)
▸ Background tint for trending vs ranging states
▸ Regime transition labels
SMART MONEY CONCEPTS
▸ Fair Value Gap zones (bullish and bearish)
▸ Liquidity Sweep detection
MULTI-TIMEFRAME
▸ Daily / Weekly / User-defined custom HTF
▸ Weighted confluence score (D 1.0x + W 1.5x + Custom 0.75x)
▸ Optional HTF pivot-based S/R lines
BTC CONTEXT (for alt traders)
▸ Optional BTC trend filter
▸ Relative strength vs BTC
SIGNAL ENGINE
▸ 0-100 confidence score
▸ Configurable minimum confidence threshold
▸ Auto-tune presets (Aggressive / Balanced / Conservative / Custom)
▸ Confirmation bar requirement
▸ Minimum spacing between signals
TRADE MANAGEMENT
▸ Three take-profit levels (TP1/TP2/TP3) with configurable ATR multipliers
▸ Custom % allocation per target
▸ Adaptive SL/TP — different distances in trending vs ranging conditions
▸ Break-even stop activation after TP1
▸ Chandelier ATR trailing stop on runner portion
▸ Position size calculator (account size × risk % × confidence multiplier)
LIVE TRACKING & DIAGNOSTICS
▸ Main dashboard with all current state
▸ Signal log table — last N trades with live TP/SL outcomes
▸ Why-Not diagnostic — which filter is currently blocking each direction
▸ Regime stats — win rate broken down by trending vs ranging
ALERTS
▸ 15+ classic alertcondition triggers
▸ Optional JSON webhook payload for bot integration
━━━━━━━ HOW A BUY SIGNAL FIRES ━━━━━━━
All of the following must be true on the signal bar:
1. HMA trending up
2. RSI above 50
3. Volume delta positive
4. EMA Ribbon score ≥ +3 (at least 4 of 5 aligned bullish)
5. Supertrend bullish
6. HTF confluence score ≥ +1.5
7. Confidence score ≥ user minimum
8. BTC trend bullish (if BTC filter enabled)
9. Price not inside opposing FVG zone (if FVG filter enabled)
10. Market not in strong ranging mode
11. Price more than 0.5 ATR from upper resistance zone
12. Candle body > 50% of range
13. Minimum bars elapsed since last signal
14. Confirmation bar (if enabled)
A Sell signal requires the inverse. On 4H BTC expect roughly 1-3 signals per week in normal conditions. If you see fewer, drop the confidence floor or switch to the Aggressive preset.
━━━━━━━ RECOMMENDED USE ━━━━━━━
▸ Primary: 4H on BTC/USDT, ETH/USDT, and majors
▸ Also works: Daily, 12H, 8H
▸ Use caution below 1H — noise increases, news spikes can trigger wicks
▸ Low-liquidity alts: bump ATR period to 21
WORKFLOW
1. Start on the Balanced preset
2. Watch the dashboard and Why-Not panel for a few sessions
3. Adjust the confidence floor based on signal frequency
4. Enable Regime Stats after chart history accumulates
5. For bots: enable JSON webhook alerts, route via "Any alert() function call"
━━━━━━━ REPAINT DISCLOSURE ━━━━━━━
Full transparency on what does and doesn't repaint:
▸ HMA, Supertrend, EMA Ribbon: repaint on the developing current bar (use bar-close confirmation for live trading)
▸ HTF confluence (D/W/Custom): all use [1] offset — fetch last closed HTF bar only — NO intra-period repaint, NO lookahead
▸ RSI and CVD divergence labels: plotted at confirmed pivot bar (5 bars after the actual pivot). Do NOT appear and disappear.
▸ FVG zones: drawn on confirmation bar of the 3-bar gap pattern. Do not repaint once drawn.
▸ Liquidity sweeps: detected on bar close
▸ Trade outcomes (signal log): evaluated on each closing bar
▸ Regime transition labels: confirmed on bar close
━━━━━━━ HONEST LIMITATIONS ━━━━━━━
▸ This is a decision-support tool, not a complete trading system. Risk management, position discipline, and execution matter more than any indicator.
▸ Signal outcomes in the Regime Stats table are based on bar-close evaluation. Real-fill slippage is not modeled.
▸ Volume Delta is approximated from candle structure, not true tick-level bid/ask (TradingView doesn't expose that without premium feeds).
▸ FVG and liquidity sweep are simplified interpretations of those concepts — pure SMC purists may prefer dedicated tools.
▸ The regime classifier is a heuristic composite. It works well on liquid crypto pairs but can lag at sharp inflection points.
▸ Past performance does not predict future results.
━━━━━━━ SETTINGS OVERVIEW ━━━━━━━
The script has many inputs, grouped by function. For first-time users, the most important groups are:
▸ Preset & Theme → pick Balanced to start
▸ UI Sizing → table text and label sizes
▸ Signal Engine → set Minimum Confidence Score
▸ Tiered Exits → TP/SL multipliers and % allocation
▸ Position Sizing → account size and risk per trade
▸ Alerts & Webhooks → enable JSON for bot trading
Default state shows a clean chart: HMA, Supertrend, BB, regime tint, signal labels, plus three tables (dashboard, signal log, HTF panel). Everything else is one toggle away — EMA Ribbon, FVG boxes, ATR zones, HTF S/R lines, CVD divergence labels, sweep markers, Why-Not diagnostic, Regime Stats.
━━━━━━━ WHAT'S NOT INCLUDED ━━━━━━━
▸ Full strategy() backtest — this is an indicator(). A companion strategy script may be released separately.
▸ Funding rate / open interest overlays — require specific tickers not universally available
▸ Chart pattern recognition (H&S, wedges, etc.)
━━━━━━━ CREDITS ━━━━━━━
Built on Pine Script v6. Uses TradingView built-ins: ta.supertrend, ta.dmi, ta.bb, ta.macd, ta.rsi, ta.pivothigh, ta.pivotlow, ta.valuewhen. Choppiness Index, CVD, FVG detection, liquidity sweep logic, regime classifier, confidence scoring, trade tracking, and confluence weighting are custom implementations.
═══════════════════════════════════════════════
CRYPTO ULTIMATE INDICATOR (CUI)
═══════════════════════════════════════════════
A multi-layer confluence system for crypto traders. Stacks 12+ independent technical layers — trend, momentum, volume, regime, multi-timeframe bias, and Smart Money Concepts — and fires Buy/Sell signals only when enough of them agree. Every signal comes with a confidence score, three take-profit levels, position size recommendation, and live outcome tracking.
Built for 4H and Daily crypto charts. No proprietary "secret sauce" — every component is documented and every input is exposed.
━━━━━━━ WHY THIS EXISTS ━━━━━━━
Most multi-indicator scripts stack correlated trend filters (more EMAs, more oscillators) and call it "confluence." That just adds the illusion of agreement without adding independent information.
CUI's filter stack is built from genuinely different signal sources, so when they align, that alignment carries real weight:
• Trend regime — HMA + Supertrend + EMA Ribbon
• Momentum — RSI with proper pivot-to-pivot divergence
• Volume flow — body-weighted Volume Delta + CVD divergence
• Volatility state — Bollinger squeeze + squeeze-release timing
• Market structure — composite of ADX, Choppiness Index, BB-width percentile
• Multi-timeframe — weighted Daily / Weekly / Custom HTF (all [1] offset, no repaint)
• Liquidity & gaps — Fair Value Gaps + Liquidity Sweep detection
• External context — optional BTC trend filter for alt trading
A Buy or Sell only fires when the relevant subset of these align. A built-in "Why-Not" diagnostic table shows you exactly which filter is blocking a near-signal at any moment — turning the indicator into a tunable system rather than a black box.
━━━━━━━ CORE FEATURES ━━━━━━━
TREND & MOMENTUM
▸ Hull Moving Average (configurable length)
▸ Supertrend with ATR factor
▸ 5-EMA Ribbon (8/13/21/34/55) with stacking score
▸ RSI with consecutive-pivot divergence detection
▸ MACD and Stochastic RSI (data window)
VOLUME
▸ Body-weighted Volume Delta (not naive close-position)
▸ Cumulative Volume Delta (CVD)
▸ CVD divergence at confirmed pivots
VOLATILITY & REGIME
▸ Bollinger Bands with squeeze detection and release timing
▸ Composite regime classifier (ADX × CHOP × BB-width)
▸ Background tint for trending vs ranging states
▸ Regime transition labels
SMART MONEY CONCEPTS
▸ Fair Value Gap zones (bullish and bearish)
▸ Liquidity Sweep detection
MULTI-TIMEFRAME
▸ Daily / Weekly / User-defined custom HTF
▸ Weighted confluence score (D 1.0x + W 1.5x + Custom 0.75x)
▸ Optional HTF pivot-based S/R lines
BTC CONTEXT (for alt traders)
▸ Optional BTC trend filter
▸ Relative strength vs BTC
SIGNAL ENGINE
▸ 0-100 confidence score
▸ Configurable minimum confidence threshold
▸ Auto-tune presets (Aggressive / Balanced / Conservative / Custom)
▸ Confirmation bar requirement
▸ Minimum spacing between signals
TRADE MANAGEMENT
▸ Three take-profit levels (TP1/TP2/TP3) with configurable ATR multipliers
▸ Custom % allocation per target
▸ Adaptive SL/TP — different distances in trending vs ranging conditions
▸ Break-even stop activation after TP1
▸ Chandelier ATR trailing stop on runner portion
▸ Position size calculator (account size × risk % × confidence multiplier)
LIVE TRACKING & DIAGNOSTICS
▸ Main dashboard with all current state
▸ Signal log table — last N trades with live TP/SL outcomes
▸ Why-Not diagnostic — which filter is currently blocking each direction
▸ Regime stats — win rate broken down by trending vs ranging
ALERTS
▸ 15+ classic alertcondition triggers
▸ Optional JSON webhook payload for bot integration
━━━━━━━ HOW A BUY SIGNAL FIRES ━━━━━━━
All of the following must be true on the signal bar:
1. HMA trending up
2. RSI above 50
3. Volume delta positive
4. EMA Ribbon score ≥ +3 (at least 4 of 5 aligned bullish)
5. Supertrend bullish
6. HTF confluence score ≥ +1.5
7. Confidence score ≥ user minimum
8. BTC trend bullish (if BTC filter enabled)
9. Price not inside opposing FVG zone (if FVG filter enabled)
10. Market not in strong ranging mode
11. Price more than 0.5 ATR from upper resistance zone
12. Candle body > 50% of range
13. Minimum bars elapsed since last signal
14. Confirmation bar (if enabled)
A Sell signal requires the inverse. On 4H BTC expect roughly 1-3 signals per week in normal conditions. If you see fewer, drop the confidence floor or switch to the Aggressive preset.
━━━━━━━ RECOMMENDED USE ━━━━━━━
▸ Primary: 4H on BTC/USDT, ETH/USDT, and majors
▸ Also works: Daily, 12H, 8H
▸ Use caution below 1H — noise increases, news spikes can trigger wicks
▸ Low-liquidity alts: bump ATR period to 21
WORKFLOW
1. Start on the Balanced preset
2. Watch the dashboard and Why-Not panel for a few sessions
3. Adjust the confidence floor based on signal frequency
4. Enable Regime Stats after chart history accumulates
5. For bots: enable JSON webhook alerts, route via "Any alert() function call"
━━━━━━━ REPAINT DISCLOSURE ━━━━━━━
Full transparency on what does and doesn't repaint:
▸ HMA, Supertrend, EMA Ribbon: repaint on the developing current bar (use bar-close confirmation for live trading)
▸ HTF confluence (D/W/Custom): all use [1] offset — fetch last closed HTF bar only — NO intra-period repaint, NO lookahead
▸ RSI and CVD divergence labels: plotted at confirmed pivot bar (5 bars after the actual pivot). Do NOT appear and disappear.
▸ FVG zones: drawn on confirmation bar of the 3-bar gap pattern. Do not repaint once drawn.
▸ Liquidity sweeps: detected on bar close
▸ Trade outcomes (signal log): evaluated on each closing bar
▸ Regime transition labels: confirmed on bar close
━━━━━━━ HONEST LIMITATIONS ━━━━━━━
▸ This is a decision-support tool, not a complete trading system. Risk management, position discipline, and execution matter more than any indicator.
▸ Signal outcomes in the Regime Stats table are based on bar-close evaluation. Real-fill slippage is not modeled.
▸ Volume Delta is approximated from candle structure, not true tick-level bid/ask (TradingView doesn't expose that without premium feeds).
▸ FVG and liquidity sweep are simplified interpretations of those concepts — pure SMC purists may prefer dedicated tools.
▸ The regime classifier is a heuristic composite. It works well on liquid crypto pairs but can lag at sharp inflection points.
▸ Past performance does not predict future results.
━━━━━━━ SETTINGS OVERVIEW ━━━━━━━
The script has many inputs, grouped by function. For first-time users, the most important groups are:
▸ Preset & Theme → pick Balanced to start
▸ UI Sizing → table text and label sizes
▸ Signal Engine → set Minimum Confidence Score
▸ Tiered Exits → TP/SL multipliers and % allocation
▸ Position Sizing → account size and risk per trade
▸ Alerts & Webhooks → enable JSON for bot trading
Default state shows a clean chart: HMA, Supertrend, BB, regime tint, signal labels, plus three tables (dashboard, signal log, HTF panel). Everything else is one toggle away — EMA Ribbon, FVG boxes, ATR zones, HTF S/R lines, CVD divergence labels, sweep markers, Why-Not diagnostic, Regime Stats.
━━━━━━━ WHAT'S NOT INCLUDED ━━━━━━━
▸ Full strategy() backtest — this is an indicator(). A companion strategy script may be released separately.
▸ Funding rate / open interest overlays — require specific tickers not universally available
▸ Chart pattern recognition (H&S, wedges, etc.)
━━━━━━━ CREDITS ━━━━━━━
Built on Pine Script v6. Uses TradingView built-ins: ta.supertrend, ta.dmi, ta.bb, ta.macd, ta.rsi, ta.pivothigh, ta.pivotlow, ta.valuewhen. Choppiness Index, CVD, FVG detection, liquidity sweep logic, regime classifier, confidence scoring, trade tracking, and confluence weighting are custom implementations.
═══════════════════════════════════════════════
發行說明
Updated functionality 開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。