INVITE-ONLY SCRIPT
تم تحديثه

Auto Harmonic Patterns [Trader-Alex])

1 855
This indicator is a sophisticated technical analysis tool designed to automate the identification of Harmonic Patterns across financial markets. By utilizing a multi-layered scanning engine, it detects valid geometric structures in price action, helping traders identify high-probability reversal zones (PRZ) with precision.

Whether you are a scalper or a swing trader, this tool streamlines the complex process of measuring Fibonacci ratios, allowing you to focus on execution rather than manual drawing.

Key Features

Multi-Scale Scanning Engine: The indicator runs 5 independent scanning groups simultaneously. This allows it to detect patterns across different market distinct market cycles (micro-structures to macro-trends) within a single timeframe.

Comprehensive Pattern Support: Automatically recognizes a wide range of classic and modern harmonic patterns, including:

  • Gartley

  • Bat & Alt Bat

  • Butterfly

  • Crab & Deep Crab

  • Shark

  • Cypher


Predictive PRZ Technology (Potential Patterns): Unlike standard indicators that only show completed patterns, this tool projects "Potential Patterns" in real-time. It calculates the Potential Reversal Zone (PRZ) based on converging Fibonacci projections, giving you a clear visual of where the D-point (Entry) is likely to form before price arrives.

Smart Filtering & Optimization: To maintain a clean chart, the indicator includes an intelligent filtering system. If multiple patterns are detected in the same area, it automatically evaluates the geometry and risk-to-reward ratio to display only the most optimal setup.

Integrated Trade Management: For every valid pattern, the indicator automatically plots:

  • Entry Level: The optimal completion point.

  • Stop Loss (SL): Calculated based on invalidation structures.

  • Take Profit (TP1 & TP2): Based on standard harmonic retracement targets.


Visual Clarity: Distinguishes between Bullish (Green/Blue tones) and Bearish (Red/Orange tones) setups. Successful historical patterns and currently developing patterns are visually distinct for easy back-testing and live trading.

Disclaimer This tool is for educational and informational purposes only. Trading financial markets involves risk. Past performance of harmonic patterns does not guarantee future results. Always use proper risk management.


-------------------------------------------------------------------------------------


此指標是一套高階的技術分析工具,專為自動化識別金融市場中的「諧波型態 (Harmonic Patterns)」而設計。透過多層次的掃描引擎,它能精準偵測價格行為中的幾何結構,協助交易者快速鎖定高勝率的潛在反轉區 (PRZ)。

無論您是短線交易者還是波段交易者,此工具都能簡化繁瑣的費波那契比例測量過程,讓您能專注於交易決策而非手動繪圖。

核心功能

多維度掃描引擎: 指標內建 5 組獨立的掃描運算邏輯,能夠同時運行。這意味著它能在單一圖表時間週期內,同時捕捉從小級別結構到大級別趨勢的各種型態。

支援多種經典型態: 自動識別市場上主流的諧波結構,包含:

  • 加特利 (Gartley)

  • 蝙蝠與變種蝙蝠 (Bat & Alt Bat)

  • 蝴蝶 (Butterfly)

  • 螃蟹與深海螃蟹 (Crab & Deep Crab)

  • 鯊魚 (Shark)

  • 賽福 (Cypher)


預測性 PRZ 技術 (潛在型態): 不同於一般指標僅顯示「已完成」的歷史型態,本工具具備即時預測功能。它能根據費波那契數列的匯聚點,計算出潛在反轉區 (PRZ),在價格到達前提前標示出預期的 D 點 (入場點)。

智能篩選與優化: 為了保持圖表整潔,指標內建智能過濾系統。當同一區域偵測到多個重疊型態時,系統會自動評估幾何結構與盈虧比,僅顯示條件最優異的一個交易機會。

整合式交易管理: 針對每一個有效型態,指標會自動計算並繪製:

  • 入場價 (Entry): 型態完成的最佳價位。

  • 止損位 (SL): 基於結構失效點的防守位置。

  • 止盈位 (TP1 & TP2): 基於諧波回撤比例的標準獲利目標。


視覺化清晰呈現: 清楚區分看漲 (綠/藍色系) 與看跌 (紅/橙色系) 架構。歷史勝率回測線圖與正在發展中的潛在型態均有不同的視覺樣式,方便用戶進行複盤與實盤操作。

免責聲明 本工具僅供教學與輔助分析使用。金融市場交易具有風險,諧波型態的歷史表現不代表未來獲利保證。請務必做好個人風險管理。
ملاحظات الأخبار
Auto Harmonic Patterns [Custom Colors & UI Update]
This update brings a significant overhaul to the visual customization and user interface of the Auto Harmonic Patterns indicator. Designed for traders who require precise control over their chart aesthetics, this version allows for full color customization and improved visibility across different chart themes.

Key Features & Updates:

1. 🎨 Individual Pattern Customization You now have granular control over every harmonic pattern.

Toggle Visibility: Independently enable or disable specific patterns (e.g., show only Gartley and Bat, hide others).

Custom Colors: Assign a unique color to each pattern type. For example, set Gartley to Green, Shark to Cyan, and Crab to Purple to easily distinguish them at a glance.

2. 🌓 Dark & Light Mode Support Fixed visibility issues for entry labels on different backgrounds.

Dark Mode: Sets Entry text to White (optimized for dark backgrounds).

Light Mode: Sets Entry text to Black (optimized for light/white backgrounds).

Select your preference in the "Style Settings".

3. 🎯 Custom TP & SL Colors

You are no longer restricted to the default green/red for Take Profit and Stop Loss lines.

Customize the TP Line Color and SL Line Color directly in the settings to match your personal charting theme.

How to Use:

Add the indicator to your chart.

Open Settings (Inputs tab).

Scroll to "Pattern Visibility & Colors" to toggle patterns and set their specific colors.

Scroll to "Style Settings" to select your Chart Mode (Dark/Light) and set custom TP/SL line colors.

-----------------------------------------------------------------------------------------------------

自動諧波型態識別 (Auto Harmonic Patterns) - 自定義顏色與介面更新
本次更新大幅提升了指標的視覺客製化功能與使用者介面體驗。專為需要精確控制圖表美學的交易者設計,此版本允許完全自定義顏色,並優化了在不同圖表主題下的顯示效果。

主要功能與更新:

1. 🎨 獨立型態客製化 您現在可以對每一個諧波型態進行細緻的控制。

獨立開關: 單獨啟用或關閉特定型態(例如:只顯示 Gartley 和 Bat,隱藏其他型態)。

自定義顏色: 為每一種型態指定獨立的顏色。例如,您可以將 Gartley 設為綠色,Shark 設為青色,Crab 設為紫色,以便一眼區分不同架構。

2. 🌓 支援日間與夜間模式 (Dark/Light Mode) 解決了進場價格 (Entry) 文字在不同背景顏色下看不清楚的問題。

Dark Mode (夜間模式): 將 Entry 文字設為 白色(適用於深色背景)。

Light Mode (日間模式): 將 Entry 文字設為 黑色(適用於淺色/白色背景)。

請在「樣式設定 (Style Settings)」中選擇您的偏好。

3. 🎯 自定義 TP 與 SL 顏色

止盈 (TP) 與止損 (SL) 線條不再侷限於預設的紅綠色。

您可以在設定中直接自定義 TP Line Color 與 SL Line Color,使其完美融入您的個人圖表配色。

使用說明:

將指標加入圖表。

打開 設定 (Settings)。

前往 "Pattern Visibility & Colors" 區塊,開關特定型態並設定其專屬顏色。

前往 "Style Settings" 區塊,選擇圖表模式 (Dark/Light) 並設定喜歡的 TP/SL 線條顏色。
ملاحظات الأخبار
Auto Harmonic Patterns [Logic Fix & Win Rate Stats]
This major update introduces a robust statistical analysis tool and significantly improves the pattern recognition engine to ensure the most accurate harmonic detections.

Key Updates:

1. 📊 Real-Time Win Rate Statistics Table A new dashboard has been added to the chart (customizable position) to track the historical performance of every pattern.

Metrics: Displays Total patterns found, TP1 Hit %, TP2 Hit %, and SL Hit %.

Break-Even Logic: The statistics use smart tracking. If a pattern hits TP1, it is considered a "winning" or "break-even" trade. If price subsequently reverses to hit the Stop Loss, it is not recorded as a loss in the SL% column, providing a more realistic view of trade management.

2. 🧠 Enhanced Pattern Recognition (Best Fit Algorithm) We have overhauled the detection logic to solve overlapping pattern conflicts.

Shark vs. Cypher Fix: Previously, some Shark patterns were incorrectly identified as Cyphers due to similar B-point ratios. The new "Best Fit" algorithm compares the geometric error score of both patterns and selects the one that is mathematically closer to the ideal definition.

Dual Shark Targets: The indicator now distinguishes between the 0.886 Shark and the 1.13 Shark. It automatically detects which D-point projection matches the price action better and adjusts the Entry, SL, and Targets accordingly.

----------------------------------------------------------------------------

自動諧波型態識別 [邏輯修復與勝率統計]
本次更新引入了強大的統計分析工具,並大幅改進了型態識別引擎,以確保提供最精確的諧波交易訊號。

主要更新內容:

1. 📊 即時勝率統計表格 (Statistics Table) 圖表上新增了一個數據儀表板(位置可自定義),用於追蹤歷史型態的表現。

數據指標: 顯示已發現的 型態總數 (Total)、TP1 命中率、TP2 命中率 以及 止損率 (SL %)。

保本邏輯 (Break-Even Logic): 統計採用更貼近實戰的邏輯。如果價格先觸發了 TP1,該交易即被視為獲利或保本。若價格隨後反轉觸碰止損,不會被計入 SL% 的敗場中,這能提供更具參考價值的風險評估。

2. 🧠 強化識別邏輯 (最佳匹配算法) 我們全面修正了檢測邏輯,解決了型態重疊時的衝突問題。

修復 Shark 與 Cypher 衝突: 過去部分鯊魚型態 (Shark) 因 B 點比例相近而被誤判為賽弗 (Cypher)。新的「最佳匹配 (Best Fit)」演算法會計算幾何誤差值,自動選擇數學比例上最完美的型態進行標記。

雙重鯊魚目標: 指標現在能自動區分 0.886 Shark 與 1.13 Shark。程式會自動判斷價格行為更符合哪一種 D 點延伸,並據此調整進場點、止損位與獲利目標。
ملاحظات الأخبار
This update focuses on improving user accessibility and providing traders with greater flexibility in defining their trade zones.

Key Features & Updates:

1. 🌐 Bilingual Settings Interface (English & Chinese) To make the indicator more accessible, all input parameters and setting menus have been updated to a dual-language format: English (Chinese).

Traders can now easily understand complex harmonic parameters (like "Tolerance" or "Scan Period") without language barriers.

Example: Length is now displayed as Length (長度).

2. ↔️ Customizable PRZ Width (Padding) Standard harmonic calculations can sometimes result in a Potential Reversal Zone (PRZ) that is too narrow, leading to valid trades being visually "stopped out" by small wicks.

New Feature: Added a "PRZ Padding %" setting.

How it works: You can manually expand the upper and lower boundaries of the PRZ box by a specific percentage. This allows you to create a wider "kill zone" to accommodate market volatility and price spikes, ensuring you don't miss entries due to tight calculations.

----------------------------------------------------------------------------------------

本次更新致力於提升使用者的操作體驗,並為交易者提供更靈活的反轉區 (PRZ) 定義功能。

主要功能與更新:

1. 🌐 全面雙語設定介面 (中英對照) 為了讓指標更易於上手,我們將所有的參數輸入與設定選單全面更新為 英文 (中文) 對照格式。

使用者現在可以直觀地理解各種諧波參數(如「容錯率」或「掃描週期」),不再受語言隔閡影響。

例如:Length 選項現在顯示為 Length (長度)。

2. ↔️ 自定義 PRZ 寬度 (緩衝區調整) 標準的諧波計算有時會產生非常狹窄的潛在反轉區 (PRZ),導致有效的交易機會因為 K 線的輕微插針而在視覺上看似失效。

新功能: 新增 "PRZ Padding % (PRZ 寬度擴張 %)" 設定。

操作方式: 您可以設定一個百分比,手動將 PRZ 方框的上下邊界向外擴張。這能幫助您建立一個更寬裕的「狙擊區」,以容納市場的正常波動與插針行情,避免因計算過於嚴格而錯失進場機會。
ملاحظات الأخبار
PRZ Padding % = 0.3
ملاحظات الأخبار
This update introduces a sophisticated "Smart Swing" algorithm designed to fix common visual inaccuracies in harmonic pattern detection, ensuring patterns align perfectly with market price action.

Key Feature: Active A & C Point Optimization

The Problem: Standard pivot detection (Pivot High/Low) often misses the true local high or low due to strict "left/right bars" requirements. This can cause patterns to connect to a lower high (or higher low) instead of the actual peak, making the A or C points look "floating" or inaccurate.

The Solution: The indicator now performs a secondary scan between the legs of the pattern:

  • For Point A: Scans between X and B.


  • For Point C: Scans between B and D.


If a better (more extreme) price point is found within these ranges, the indicator automatically replaces the original A and C points with the true swing high/low.

The Result: Pattern legs now snap perfectly to the wicks of the candles. This results in significantly more accurate Fibonacci ratio calculations for the pattern structure and PRZ.

(Note: Point B is intentionally anchored to its original pivot to preserve the core classification of the harmonic pattern, e.g., distinguishing Gartley from Bat.)


自動諧波型態識別 [智能波段優化]
本次更新引入了先進的 「智能波段 (Smart Swing)」演算法,旨在修復諧波檢測中常見的視覺與計算誤差,確保型態能完美貼合市場的真實價格行為。

核心功能:主動式 A 點與 C 點優化

問題痛點: 傳統的 Pivot(轉折點)偵測常因嚴格的「左右 K 線數量」限制,而錯過真正的局部最高或最低點。這會導致畫出的型態 A 點或 C 點沒有連在最高的影線上,而是連在旁邊較低的次高點,造成視覺上的「懸空」或不精確。

解決方案: 指標現在會對型態的區間進行二次掃描:

  • 針對 A 點:
掃描 X 到 B 之間。

  • 針對 C 點:
掃描 B 到 D 之間。

如果在這些區間內發現了比原本偵測到的 Pivot 更極端的價格,程式會自動將 A 點與 C 點 替換 為真正的市場轉折高/低點。

更新成效: 型態連線現在會完美吸附在 K 線的影線尖端。這不僅讓圖表更乾淨,更大幅提升了斐波那契比例計算與反轉區 (PRZ) 的精確度。

(註:B 點維持原有的 Pivot 定義不變,以確保諧波架構的核心分類——如區分 Gartley 與 Bat——不會被破壞。)

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.