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.*
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.