<Ultimate> Auto Harmonic Patterns [Trader-Alex]

Ultimate Auto Harmonic Patterns Scanner
Overview
This indicator is an advanced algorithmic tool designed to automatically identify Harmonic Patterns on the chart. It operates in two modes simultaneously: scanning for Potential Patterns (forming in real-time) and plotting Historical Patterns (completed patterns) to analyze past market behavior. The script utilizes a multi-length zigzag scanning engine to detect market structures across various magnitudes without requiring manual drawing.
Supported Patterns
The indicator is capable of detecting the following specific harmonic structures:
- Gartley / Deep Gartley
- Bat / Alt Bat
- Butterfly
- Crab / Deep Crab
- Shark (886 & 113)
- Cypher
- 5-0 Pattern
Entry, Take Profit (TP), and Stop Loss (SL) Logic
The indicator automatically projects Entry, TP, and SL levels based on Fibonacci ratios specific to each pattern type.
General Rules (Gartley, Bat, Butterfly, Crab):
- Entry: The completion point of the pattern (Point D).
- TP1: 0.382 retracement of the AD or CD leg.
- TP2: 0.618 retracement of the AD or CD leg.
- SL: Placed beyond the X point or the next critical Fibonacci extension level (e.g., 1.13 or 1.27), calculated to offer a favorable Risk-to-Reward ratio.
Specific Rules (Shark, 5-0):
- Shark: TP levels are typically derived from the 50% and 88.6% retracement of the CD leg.
- 5-0 Pattern: Uses specific structure-based targeting (e.g., targeting the Reciprocal AB=CD or structural High/Low).
How to Use
1. Potential Patterns (Real-time Scanning) When a pattern is forming but has not yet completed, the indicator displays dashed lines connecting X-A-B-C.
- A PRZ (Potential Reversal Zone) box is projected. This zone represents the confluence of Fibonacci projections where price is expected to react.
- Entry, TP, and SL levels are displayed as dynamic lines that update as the C-leg develops.
- The label displays real-time Risk-to-Reward (R:R) ratios and Risk % calculations relative to the current price action.
- Once price enters the PRZ and reacts validly, the pattern may convert into a historical pattern.
2. Historical Patterns (Backtesting) Completed patterns are plotted with solid lines.
- The indicator tracks the outcome of each historical pattern.
- A statistics table (if enabled) summarizes the total count of detected patterns, win rates for TP1/TP2, and the stop-loss hit rate.
- This allows traders to verify which patterns perform best on the current asset and timeframe.
Settings & Parameters Guide
Scan Period Settings This section controls the sensitivity of the ZigZag loop engine.
- Real-time Sensitivity: Enables the shortest detection length for immediate price action.
- Start Length / End Length: Defines the range of ZigZag periods the script will scan. A wider range (e.g., 10 to 50) detects patterns of various sizes (both small intraday structures and larger swing structures).
- Range Step: Controls the interval between scan lengths. A lower step (e.g., 1 or 2) provides higher precision but requires more calculation power; a higher step improves loading speed.
Pattern Visibility & Colors
Allows you to toggle specific patterns on or off and customize their colors.
- Enable/Disable individual patterns (e.g., uncheck "5-0" if you do not trade it).
- Customize colors for visual clarity (e.g., differentiating Bullish vs. Bearish tones).
Style & TP/SL Settings
Controls the visual appearance of trade setups.
- Bullish/Bearish Entry/TP/SL Colors: Set distinct colors for order lines.
- Line Length Multiplier: Adjusts how far the TP/SL lines extend to the right.
- History TP/SL Count: Determines how many recent historical patterns show their trade lines. Set to 0 to see lines only for potential patterns.
- PRZ Extra Padding %:
Expands the PRZ box height to account for market volatility.
Statistics Table Settings
- Show Statistics Table: Toggles the dashboard overlay.
- Table Position / Size: Adjusts where the table appears on the chart and its font size.
- The table displays: Total detected patterns, % hitting TP1, % hitting TP2, and % hitting SL.
Core Logic
- Tolerance % (Global): The allowable deviation from ideal Fibonacci ratios. Increasing this detects more patterns but may reduce accuracy; decreasing it finds fewer but strictly "perfect" patterns.
- Strict Tolerance %: Applies a tighter deviation rule for specific patterns that require precision (e.g., Gartley).
- Min Profit %: Filters out patterns where the distance between Entry and TP1 is too small to be tradeable.
終極自動諧波型態掃描器 (Ultimate Auto Harmonic Patterns Scanner)
概述
本指標是一個進階的算法工具,旨在自動識別圖表上的諧波型態 (Harmonic Patterns)。它同時以兩種模式運作:掃描即時形成的潛在型態 (Potential Patterns),以及繪製已完成的歷史型態 (Historical Patterns)以供回測分析。腳本採用多重週期的 ZigZag 掃描引擎,無需手動繪圖即可偵測不同規模的市場結構。
支援的型態
本指標能夠識別以下特定的諧波結構:
- Gartley (加特利) / Deep Gartley (深加特利)
- Bat (蝙蝠) / Alt Bat (變異蝙蝠)
- Butterfly (蝴蝶)
- Crab (螃蟹) / Deep Crab (深海螃蟹)
- Shark (鯊魚 886 & 113)
- Cypher (賽福)
- 5-0 Pattern (5-0 型態)
進場、止盈 (TP) 與止損 (SL) 邏輯
指標會根據每種型態特定的費波那契比例,自動投射進場點、止盈位與止損位。
通用規則 (Gartley, Bat, Butterfly, Crab):
- 進場 (Entry): 型態完成點 (D 點)。
- TP1: AD 或 CD 腳的 0.382 回撤位。
- TP2: AD 或 CD 腳的 0.618 回撤位。
- SL: 設置於 X 點之外或下一個關鍵費波那契延伸位 (如 1.13 或 1.27),計算邏輯旨在提供有利的風險回報比。
特殊規則 (Shark, 5-0):
- Shark: TP 水平通常源自 CD 腳的 50% 和 88.6% 回撤。
- 5-0 Pattern: 使用特定的結構目標位 (例如鎖定倒數 AB=CD 或結構高/低點)。
使用方法
1. 潛在型態 (即時掃描) 當型態正在形成但尚未完成時,指標會顯示連接 X-A-B-C 的虛線。
- 指標會投射一個 PRZ (潛在反轉區) 方框。此區域代表費波那契投射的匯聚處,價格預期在此產生反應。
- 進場、TP 和 SL 水平顯示為動態線條,會隨著 C 腳的發展而更新。
- 標籤會顯示即時的風險回報比 (R:R) 以及相對於當前價格的風險百分比 (Risk %)。
- 一旦價格進入 PRZ 並產生有效反應,該型態可能會轉變為歷史型態。
2. 歷史型態 (回測)
已完成的型態將以實線繪製。
- 指標會追蹤每個歷史型態的結果。
- 統計表 (若啟用) 會總結偵測到的型態總數、TP1/TP2 的勝率以及觸發止損的比率。
- 這允許交易者驗證哪些型態在當前資產和時間週期上表現最佳。
設定與參數指南
Scan Period Settings (掃描週期設定)
此區塊控制 ZigZag 循環週期的靈敏度。
- Real-time Sensitivity: 啟用最短的偵測長度,以捕捉最即時的價格行為。
- Start Length / End Length (掃描週期下限/上限): 定義腳本將掃描的 ZigZag 週期範圍。較寬的範圍 (例如 10 到 50) 可以同時偵測不同大小的型態 (包含小型日內結構與大型波段結構)。
- Range Step (掃描週期間隔): 控制掃描長度之間的間隔。較低的步長 (例如 1 或 2) 提供較高的精確度但需要較多運算效能;較高的步長則能提升載入速度。
Pattern Visibility & Colors (型態開關與顏色)
允許您開啟或關閉特定型態並自訂其顏色。
- 啟用/禁用個別型態 (例如:若您不交易 5-0 型態,可將其取消勾選)。
- 自訂顏色以提升視覺清晰度 (例如:區分看漲與看跌的色調)。
Style & TP/SL Settings (樣式與止盈止損設定) 控制交易設置的視覺外觀。
- Bullish/Bearish Entry/TP/SL Colors:
為訂單線條設定不同的顏色。 - Line Length Multiplier: 調整 TP/SL 線條向右延伸的長度。
- History TP/SL Count: 決定顯示多少個最近歷史型態的交易線。設為 0 則只顯示潛在型態的線條。
- PRZ Extra Padding %: 擴大 PRZ 方框的高度,以容納市場波動。
Statistics Table Settings (統計表格設定)
- Show Statistics Table: 切換儀表板的顯示/隱藏。
- Table Position / Size: 調整表格在圖表上的位置及其字體大小。
- 表格顯示內容:偵測到的型態總數、達到 TP1 的百分比、達到 TP2 的百分比,以及觸及 SL 的百分比。
Core Logic (核心邏輯)
- Tolerance % (Global) (全局容錯率): 允許與理想費波那契比例的誤差範圍。增加此數值可偵測到更多型態,但可能會降低準確度;減少此數值則僅尋找嚴格符合標準的「完美」型態。
- Strict Tolerance % (嚴格容錯率): 對需要高精度的特定型態 (如 Gartley) 應用更嚴格的誤差規則。
- Min Profit % (最小獲利 %): 過濾掉那些進場點與 TP1 距離過小、不具備交易價值的型態。
Skrip hanya-undangan
Hanya pengguna yang disetujui oleh penulis yang dapat mengakses skrip ini. Anda perlu meminta dan mendapatkan izin untuk menggunakannya. Izin ini biasanya diberikan setelah pembayaran. Untuk detail selengkapnya, ikuti petunjuk penulis di bawah ini atau hubungi Trader-Alex secara langsung.
TradingView TIDAK menyarankan untuk membayar atau menggunakan skrip kecuali Anda sepenuhnya mempercayai pembuatnya dan memahami cara kerjanya. Anda juga dapat menemukan alternatif yang gratis dan sumber terbuka di skrip komunitas kami.
Instruksi penulis
交易所註冊連結|>
BingX |>
bingx.com/invite/VBXORPQC
Pernyataan Penyangkalan
Skrip hanya-undangan
Hanya pengguna yang disetujui oleh penulis yang dapat mengakses skrip ini. Anda perlu meminta dan mendapatkan izin untuk menggunakannya. Izin ini biasanya diberikan setelah pembayaran. Untuk detail selengkapnya, ikuti petunjuk penulis di bawah ini atau hubungi Trader-Alex secara langsung.
TradingView TIDAK menyarankan untuk membayar atau menggunakan skrip kecuali Anda sepenuhnya mempercayai pembuatnya dan memahami cara kerjanya. Anda juga dapat menemukan alternatif yang gratis dan sumber terbuka di skrip komunitas kami.
Instruksi penulis
交易所註冊連結|>
BingX |>
bingx.com/invite/VBXORPQC