OPEN-SOURCE SCRIPT
Harmonic Assistant(XABCD)

**Harmonic Assistant (XABCD)**
**Overview**
Trading harmonic patterns can often be a highly subjective, tedious, and visually cluttered process. The **Harmonic Assistant Pro** is designed to eliminate the guesswork. It is an advanced, fully automated XABCD pattern detection engine that not only finds high-probability setups (Gartley, Bat, Butterfly, Crab) but also acts as a live trading assistant, explaining market geometry to you in real-time.
Unlike standard harmonic indicators that cover your screen in messy lines, this script introduces **Smart Label Placement** and a dynamic **Live Commentary Panel**, keeping your charts exceptionally clean and your mind focused on the trade execution.
**Key Features & Innovations**
* 🦇 **Automated Classic Patterns:** Instantly detects Bullish and Bearish Gartley, Bat, Butterfly, and Crab formations using a highly optimized, lag-free ZigZag engine.
* 🧠 **Live Commentary Panel:** The indicator speaks to you. Instead of just displaying raw math, the HUD translates ratios into actionable insights. It will tell you: *"Bat Candidate: Awaiting D at 0.886"* or *"Invalid: B point broke X origin"*.
* 📐 **Complete Auto-Fibonacci:** Once an XA leg is established, the script automatically draws a complete set of Fibonacci retracement and extension lines (from 0.0 all the way to 4.236). This allows you to visually anticipate where the D point (target) will land before it happens.
* 🛡️ **Smart Invalidation & Trend Filter:** The script knows when a pattern is mathematically dead. If the B point breaks the X origin, or if the price goes parabolic (extreme extension), it instantly invalidates the pattern to protect you from false signals.
* ✅ **Actionable Trade Plans:** Upon pattern confirmation, the script dynamically draws a Potential Reversal Zone (PRZ) box, precise Take Profit levels (TP1, TP2), and a strict Stop Loss (SL) line based on classical harmonic rules.
**How to Read the Indicator**
1. **Yellow Phase (Preparation):** The lines and the info panel are yellow. The script has found the X, A, B, and C points and is waiting for the D point to hit the Fibonacci target. Read the panel to see which pattern is forming.
2. **Green/Red Phase (Execution):** The target is hit! The panel turns Green (Bullish) or Red (Bearish). The PRZ box and TP/SL lines appear. This is your signal to look for reversal price action.
**Customizable Settings**
* **Wave Size (Pivot):** Adjusts the sensitivity of the ZigZag engine. Use lower values (e.g., 5-10) for scalp setups and higher values (e.g., 30-50) for macro swing trading.
* **Tolerance (%):** Financial markets are messy. The tolerance setting (default 10%) allows the script to catch valid patterns even if they miss the exact Fibonacci ratio by a few fractions.
* **Language:** Fully supports both English and Turkish interfaces.
* **Visual Toggles:** Turn the Auto-Fibo lines or the "Waiting" (Yellow) lines on/off to suit your visual preference.
*Disclaimer: Harmonic patterns represent high-probability reversal zones, not absolute guarantees. Always use the provided Stop Loss level and practice proper risk management.*
**Overview**
Trading harmonic patterns can often be a highly subjective, tedious, and visually cluttered process. The **Harmonic Assistant Pro** is designed to eliminate the guesswork. It is an advanced, fully automated XABCD pattern detection engine that not only finds high-probability setups (Gartley, Bat, Butterfly, Crab) but also acts as a live trading assistant, explaining market geometry to you in real-time.
Unlike standard harmonic indicators that cover your screen in messy lines, this script introduces **Smart Label Placement** and a dynamic **Live Commentary Panel**, keeping your charts exceptionally clean and your mind focused on the trade execution.
**Key Features & Innovations**
* 🦇 **Automated Classic Patterns:** Instantly detects Bullish and Bearish Gartley, Bat, Butterfly, and Crab formations using a highly optimized, lag-free ZigZag engine.
* 🧠 **Live Commentary Panel:** The indicator speaks to you. Instead of just displaying raw math, the HUD translates ratios into actionable insights. It will tell you: *"Bat Candidate: Awaiting D at 0.886"* or *"Invalid: B point broke X origin"*.
* 📐 **Complete Auto-Fibonacci:** Once an XA leg is established, the script automatically draws a complete set of Fibonacci retracement and extension lines (from 0.0 all the way to 4.236). This allows you to visually anticipate where the D point (target) will land before it happens.
* 🛡️ **Smart Invalidation & Trend Filter:** The script knows when a pattern is mathematically dead. If the B point breaks the X origin, or if the price goes parabolic (extreme extension), it instantly invalidates the pattern to protect you from false signals.
* ✅ **Actionable Trade Plans:** Upon pattern confirmation, the script dynamically draws a Potential Reversal Zone (PRZ) box, precise Take Profit levels (TP1, TP2), and a strict Stop Loss (SL) line based on classical harmonic rules.
**How to Read the Indicator**
1. **Yellow Phase (Preparation):** The lines and the info panel are yellow. The script has found the X, A, B, and C points and is waiting for the D point to hit the Fibonacci target. Read the panel to see which pattern is forming.
2. **Green/Red Phase (Execution):** The target is hit! The panel turns Green (Bullish) or Red (Bearish). The PRZ box and TP/SL lines appear. This is your signal to look for reversal price action.
**Customizable Settings**
* **Wave Size (Pivot):** Adjusts the sensitivity of the ZigZag engine. Use lower values (e.g., 5-10) for scalp setups and higher values (e.g., 30-50) for macro swing trading.
* **Tolerance (%):** Financial markets are messy. The tolerance setting (default 10%) allows the script to catch valid patterns even if they miss the exact Fibonacci ratio by a few fractions.
* **Language:** Fully supports both English and Turkish interfaces.
* **Visual Toggles:** Turn the Auto-Fibo lines or the "Waiting" (Yellow) lines on/off to suit your visual preference.
*Disclaimer: Harmonic patterns represent high-probability reversal zones, not absolute guarantees. Always use the provided Stop Loss level and practice proper risk management.*
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。