PROTECTED SOURCE SCRIPT
Advanced Cup_Bull_Bear_Beast

🏷️ Cup Pattern Finder — Description for Publication
This indicator identifies Cup Patterns (both bullish and bearish) on any timeframe, using geometric curve-fitting logic.
🔍 What is a Cup Pattern?
A Cup Pattern is a rounded-bottom formation often signaling accumulation (in bullish cases) or distribution (in bearish ones). The price gradually falls and rises forming a "U" shape, indicating a potential reversal or breakout.
🛠️ How this script works:
✅ Scans the last N candles (user-defined, e.g. 150 bars) to detect U-shaped structures.
📏 Measures radius of the curve and checks price containment within a tolerance range.
🎯 Calculates:
Target = Neckline ± Radius
Stop Loss = Minimum of 2% of close or ¼ of radius, from neckline
📉 Can detect both Bullish Cups and Bearish Inverted Cups.
🧠 You can choose how breakouts are verified (Close or High/Low basis).
🔔 Alerts available for:
Bullish Cup Found
Bearish Cup Found
Any Cup Pattern Detected
🎨 Visuals:
Option to display the cup shape, neckline, and channel width.
Labels show:
Radius of the cup
Percentage of bars contained in the cup
Custom color themes for bullish/bearish cups.
📌 Use Case:
Ideal for traders looking to automate detection of consolidation breakout zones based on price structure rather than just indicators. Combine with volume or momentum tools for better confirmation.
This indicator identifies Cup Patterns (both bullish and bearish) on any timeframe, using geometric curve-fitting logic.
🔍 What is a Cup Pattern?
A Cup Pattern is a rounded-bottom formation often signaling accumulation (in bullish cases) or distribution (in bearish ones). The price gradually falls and rises forming a "U" shape, indicating a potential reversal or breakout.
🛠️ How this script works:
✅ Scans the last N candles (user-defined, e.g. 150 bars) to detect U-shaped structures.
📏 Measures radius of the curve and checks price containment within a tolerance range.
🎯 Calculates:
Target = Neckline ± Radius
Stop Loss = Minimum of 2% of close or ¼ of radius, from neckline
📉 Can detect both Bullish Cups and Bearish Inverted Cups.
🧠 You can choose how breakouts are verified (Close or High/Low basis).
🔔 Alerts available for:
Bullish Cup Found
Bearish Cup Found
Any Cup Pattern Detected
🎨 Visuals:
Option to display the cup shape, neckline, and channel width.
Labels show:
Radius of the cup
Percentage of bars contained in the cup
Custom color themes for bullish/bearish cups.
📌 Use Case:
Ideal for traders looking to automate detection of consolidation breakout zones based on price structure rather than just indicators. Combine with volume or momentum tools for better confirmation.
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.