OPEN-SOURCE SCRIPT
Tweezer & Kangaroo Zones [WavesUnchained]

Tweezer & Kangaroo Zones
Pattern Recognition with Supply/Demand Zones
Indicator that detects tweezer and kangaroo tail (pin bar) reversal patterns and creates supply and demand zones. Includes volume validation, trend context, and confluence scoring.
What You See on Your Chart
Pattern Labels:
Label Colors Indicate Pattern Strength:
Zone Boxes:
Pattern Detection
Tweezer Patterns (Classic Double-Top/Bottom):
Kangaroo Tail / Pin Bar Patterns:
Zone Management
Confluence Scoring System
Multi-factor confluence scoring (0-10 scale) with configurable weights:
Zone Retest Signals
Signals generated when zones are retested:
Additional Features
Setup & Configuration
Quick Start:
Key Settings to Adjust:
Pattern Detection:
• Min RelVolume: Lower = more signals (0.8 Tweezer, 0.9 Kangaroo)
• Require trend context: Enable for stricter, higher-quality patterns
• Check wick similarity: Ensures proper rejection structure
Zone Management:
• Zone lifetime: How long zones remain active (default: 400 bars)
• Invalidate on close-through: Remove zones when price breaks through
• Max overlap: Prevent duplicate zones (default: 50%)
Scoring:
• Min Score BUY/SELL: Higher = fewer but better signals (default: 4.5/5.5)
• Component weights: Customize what factors matter most
• Signals require trend gate: OFF = more signals, ON = higher quality
Visual Customization
Understanding the Zones
Supply Zones (Red):
Created from bearish patterns (Tweezer Tops, Kangaroo Bears). Price made a high attempt to push higher, but was rejected. These become resistance areas where sellers may step in again.
Demand Zones (Green):
Created from bullish patterns (Tweezer Bottoms, Kangaroo Bulls). Price made a low with strong rejection. These become support areas where buyers may step in again.
Zone Quality Indicators:
• White border = Fresh zone, not tested yet
• Gray border = Zone expired or invalidated
• Thin zones (tight range) = Better risk/reward ratio
• Thick zones = Less precise, wider stop required
Trading Applications
Pro Tips
Important Notes
Technical Specifications
• Pine Script v6
• RTA-Core integration
• RTA Core Library integration
• Maximum 200 boxes, 500 labels
• Auto-tuning based on ATR and Choppiness
• Session-aware threshold adjustments
• Memory-optimized zone management
What's Included
Author Waves Unchained
Version 1.0
Status Public Indicator
Summary
Reversal pattern detection with zone management, volume validation, and confluence scoring for tweezer and kangaroo tail patterns.
---
Disclaimer: This indicator is for educational and informational purposes only. Trading involves risk. Past performance does not guarantee future results. Always practice proper risk management.
Pattern Recognition with Supply/Demand Zones
Indicator that detects tweezer and kangaroo tail (pin bar) reversal patterns and creates supply and demand zones. Includes volume validation, trend context, and confluence scoring.
What You See on Your Chart
Pattern Labels:
- "T" (Red) - Tweezer Top detected above price → Bearish reversal signal
- "T" (Green) - Tweezer Bottom detected below price → Bullish reversal signal
- "K" (Red) - Kangaroo Bear (Pin Bar rejection from top) → Bearish signal
- "K" (Green) - Kangaroo Bull (Pin Bar rejection from bottom) → Bullish signal
Label Colors Indicate Pattern Strength:
- Dark Green/Red - Strong pattern (score ≥8.0)
- Medium Green/Red - Good pattern (score ≥6.0)
- Light Green/Red - Valid pattern (score <6.0)
Zone Boxes:
- Red Boxes - Supply Zones (resistance, potential short areas)
- Green Boxes - Demand Zones (support, potential long areas)
- White Border - Active zone (fresh, not tested yet)
- Gray Border - Inactive zone (expired or invalidated)
Pattern Detection
Tweezer Patterns (Classic Double-Top/Bottom):
- Flexible Lookback - Detects patterns up to 3 bars apart (not just consecutive)
- Precision Matching - 0.2% level tolerance for high-quality signals
- Wick Similarity Check - Both candles must show similar rejection wicks
- Volume Validation - Second candle requires elevated volume (0.8x average)
- Pattern Strength Score - 0-1 quality rating based on level match + wick similarity
- Optional Trend Context - Can require trend alignment (default: OFF for more signals)
Kangaroo Tail / Pin Bar Patterns:
- No Pivot Delay - Instant detection without waiting for pivot confirmation
- Body Position Check - Body must be at candle extremes (30% tolerance)
- Volume Spike - Rejection must occur with volume (0.9x average)
- Rejection Strength - Scores based on wick length (0.5-0.9 of range)
- Optional Trend Context - Bearish in uptrends, Bullish in downtrends (default: OFF)
Zone Management
- Auto-Created Zones - Every valid pattern creates a supply/demand zone
- Overlap Prevention - Zones too close together (50% overlap) are not duplicated
- Lifetime Control - Zones expire after 400 bars (configurable)
- Smart Invalidation - Zones invalidate when price closes through them
- Styling Options - Choose between Solid, Dashed, or Dotted borders
- Border Width - 2px width for better visibility
Confluence Scoring System
Multi-factor confluence scoring (0-10 scale) with configurable weights:
- Regime (EMA+HTF) - Trend alignment across timeframes (Weight: 2.0)
- HTF Stack - Multi-timeframe trend confluence (Weight: 3.0)
- Structure - Higher lows / Lower highs confirmation (Weight: 1.0)
- Relative Volume - Volume surge validation (Weight: 1.0)
- Chop Advantage - Favorable market conditions (Weight: 1.0)
- Zone Thinness - Tight zones = better R/R (Weight: 1.0)
- Supertrend - Trend indicator alignment (Weight: 1.0)
- MOST - Moving Stop alignment (Weight: 1.0)
- Pattern Strength - Quality of detected pattern (Weight: 1.5)
Zone Retest Signals
Signals generated when zones are retested:
- BUY Signal - Price retests demand zone from above (score ≥4.5)
- SELL Signal - Price retests supply zone from below (score ≥5.5)
- Normalized Score - Displayed as 0-10 for easy interpretation
- Optional Trend Gate - Require trend alignment for signals (default: OFF)
- Alert Ready - Built-in alertconditions for automation
Additional Features
- Auto-Threshold Tuning - Adapts to ATR and Choppiness automatically
- Session Profiles - Different settings for RTH vs ETH sessions
- Organized Settings - 15+ input groups for easy configuration
- Optional Panels - HTF Stack overview and performance metrics (default: OFF)
- Data Exports - Hidden plots for strategy/library integration
- RTA Health Monitoring - Built-in performance tracking
Setup & Configuration
Quick Start:
- 1. Apply indicator to any timeframe
- 2. Patterns and zones appear automatically
- 3. Adjust pattern detection sensitivity if needed
- 4. Configure zone styling (Solid/Dashed/Dotted)
- 5. Set up alerts for zone retests
Key Settings to Adjust:
Pattern Detection:
• Min RelVolume: Lower = more signals (0.8 Tweezer, 0.9 Kangaroo)
• Require trend context: Enable for stricter, higher-quality patterns
• Check wick similarity: Ensures proper rejection structure
Zone Management:
• Zone lifetime: How long zones remain active (default: 400 bars)
• Invalidate on close-through: Remove zones when price breaks through
• Max overlap: Prevent duplicate zones (default: 50%)
Scoring:
• Min Score BUY/SELL: Higher = fewer but better signals (default: 4.5/5.5)
• Component weights: Customize what factors matter most
• Signals require trend gate: OFF = more signals, ON = higher quality
Visual Customization
- Zone Colors - Light red/green with 85% transparency (non-intrusive)
- Border Styles - Solid, Dashed, or Dotted
- Label Intensity - Darker greens for better readability
- Clean Charts - All panels OFF by default
Understanding the Zones
Supply Zones (Red):
Created from bearish patterns (Tweezer Tops, Kangaroo Bears). Price made a high attempt to push higher, but was rejected. These become resistance areas where sellers may step in again.
Demand Zones (Green):
Created from bullish patterns (Tweezer Bottoms, Kangaroo Bulls). Price made a low with strong rejection. These become support areas where buyers may step in again.
Zone Quality Indicators:
• White border = Fresh zone, not tested yet
• Gray border = Zone expired or invalidated
• Thin zones (tight range) = Better risk/reward ratio
• Thick zones = Less precise, wider stop required
Trading Applications
- Reversal Trading - Enter at pattern detection with tight stops
- Zone Retest Trading - Wait for retests of established zones
- Trend Confluence - Trade only when patterns align with trend
- Risk Management - Use zone boundaries for stop placement
- Target Setting - Opposite zones become profit targets
Pro Tips
- Best signals occur when pattern + zone retest + trend all align
- Lower timeframes = more signals but more noise
- Higher timeframes = fewer but more reliable signals
- Start with default settings, adjust based on your market
- Combine with other analysis (structure, key levels, etc.)
- Use alerts to avoid staring at charts all day
Important Notes
- Not all patterns will lead to successful trades
- Use proper risk management and position sizing
- Patterns work best in trending or range-bound markets
- Very choppy conditions may produce lower-quality signals
- Always confirm with your own analysis before trading
Technical Specifications
• Pine Script v6
• RTA-Core integration
• RTA Core Library integration
• Maximum 200 boxes, 500 labels
• Auto-tuning based on ATR and Choppiness
• Session-aware threshold adjustments
• Memory-optimized zone management
What's Included
- Tweezer Top/Bottom detection
- Kangaroo Tail / Pin Bar detection
- Automatic supply/demand zone creation
- Volume validation system
- Pattern strength scoring
- Zone retest signals
- Multi-factor confluence scoring
- Optional HTF Stack panel
- Optional performance metrics
- Session profile support
- Auto-threshold tuning
- Alert conditions
- Data exports for strategies
Author Waves Unchained
Version 1.0
Status Public Indicator
Summary
Reversal pattern detection with zone management, volume validation, and confluence scoring for tweezer and kangaroo tail patterns.
---
Disclaimer: This indicator is for educational and informational purposes only. Trading involves risk. Past performance does not guarantee future results. Always practice proper risk management.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.