INVITE-ONLY SCRIPT
Обновлено

<Elite> Auto Harmonic Patterns [Trader-Alex]

5 049
📘 User Manual: <Elite> Auto HP


Product Overview

<Elite> Auto Harmonic Patterns is a sophisticated technical analysis tool designed by Trader-Alex to identify "Harmonic Patterns" in the market.


Unlike traditional indicators that scan only a single period, this system employs "Dynamic Global Scanning" technology. It is capable of simultaneously detecting patterns within short-term fluctuations and long-term trends on a single chart. Not only does it mark historical patterns for backtesting, but it also predicts potential patterns forming in real-time, automatically plotting the Potential Reversal Zone (PRZ) along with Take Profit (TP) and Stop Loss (SL) recommendations.
Note: PRZ, TP, and SL are not investment advice. This technical indicator is intended for academic study and research purposes only.


Pattern Structure Lines (XABCD Structure)

In this indicator, the color of the XABCD connecting lines depends on the "Pattern Name." Whether the pattern is bullish or bearish, the same pattern type will display the same color, allowing you to instantly identify the structure type:
🦇 Bat: Blue
🦇 Alt Bat: Indigo
🦋 Gartley: Green
🦋 Butterfly: Orange
🦀 Crab: Purple
🦀 Deep Crab: Red
🦈 Shark: Aqua / Cyan
🔊 Cypher: Pink

How to distinguish between Bull/Bear? Please check the label text next to Point D, which explicitly marks [Bullish] or [Bearish]. The background color of the label will match the pattern colors listed above.

Trading Plan Lines (Entry, TP/SL Lines)

📈 Bullish Setup - Long Position
Entry Line: White (Default)
Take Profit (TP1 / TP2): Green
Stop Loss (SL): Red

📉 Bearish Setup - Short Position
Entry Line: White (Default)
Take Profit (TP1 / TP2): Cyan
Stop Loss (SL): Magenta
Note: It is recommended to set the Entry color to Black in Light Mode and White (default) in Dark Mode.

Potential Reversal Zone (PRZ)

When a Potential Pattern (not yet completed) is scanned, the extended rectangular block takes the same color as the representative color of that pattern.
Example: If a potential Butterfly is detected, the PRZ block will be Orange.
Example: If a potential Bat is detected, the PRZ block will be Blue.
Settings Guide

You can adjust the operation of the indicator via the settings panel. To keep the interface clean, parameters are categorized into the following groups:

⚙️ Scan Period Settings

Controls how the system "searches" for patterns. This indicator features automatic scanning, eliminating the need to manually specify a single length.
  • [Default] Real-time Sensitivity: When enabled, the system includes scanning for very short-term micro-fluctuations, significantly increasing the sensitivity of PRZ detection.
  • [Adjustable] Start Length (Lower Limit): Sets the minimum structure size for scanning (lower values detect more subtle patterns). Minimum value is 5.
  • [Adjustable] End Length (Upper Limit): Sets the maximum structure size (higher values detect larger patterns, usually representing major trends). Maximum value is 500.

Suggestion: Keep the default range to cover the majority of market volatility.

👁️ Pattern Visibility & Colors
  • [Adjustable] Checkbox: You can individually toggle specific patterns on or off (e.g., only view Gartley or Bat).
  • [Adjustable] Color: Customize the display color for each pattern to suit your visual preference.
  • 🎯 Style & TP/SL Settings
  • [Adjustable] Bullish/Bearish Entry/TP/SL Colors: Customize the colors for entry, take profit, and stop loss lines.
  • [Adjustable] Line Length Multiplier: Adjusts how far the TP/SL lines extend to the right on the chart.
  • [Adjustable] History TP/SL/Entry Lines Count:

If set to 0: Only displays lines for the current potential pattern.
If set to 1: Displays lines for the most recently completed historical pattern.
Maximum value is 50.

  • [Default] Show Potential Patterns: Toggles the display of predictive patterns currently forming.
  • [Adjustable] Max Potential Count: Limits the number of potential patterns displayed simultaneously to avoid chart clutter.
  • [Adjustable] PRZ Extra Padding %: Adjusts the width of the Potential Reversal Zone (PRZ). Increasing this value widens the reversal zone, offering higher tolerance but potentially lower precision.

Suggestion: Keep at 0% to maintain precision unless you wish to expand the capture range.


📊 Statistics Table Settings

Controls the performance statistics panel located at the bottom right (or custom position).
  • [Adjustable] Show Statistics Table: Toggle the panel On/Off.
  • [Adjustable] Table Position: Set the panel's position to one of the four corners of the chart.
  • [Adjustable] Text Size: Adjust the text size within the table.

🧠 Core Logic (Advanced)
  • [Adjustable] Tolerance %: Sets the strictness of pattern recognition.

Lower values: Patterns are more standard and precise, but fewer are detected.
Higher values: Detects more variations but may include signals with less standard ratios.
Note: The size of the error (tolerance) is not necessarily positively correlated with pattern profitability.
[Recommended Setting] 3~10%.

Statistics Dashboard

The panel located in the chart corner provides historical backtesting data for the asset on the current timeframe:
  • Pattern: Pattern Name.
  • Total: Total number of detections in history.
  • TP1 %: The probability of price reaching the first Take Profit point after triggering Entry, without hitting Stop Loss. (Close 50-60% of position here).
  • TP2 %: The probability of price reaching the second Take Profit point after triggering Entry, without hitting Stop Loss. (Close 25-50% of position here).
  • SL %: The probability of triggering Stop Loss.

Note 1: TP1% + SL% = 100%. Reaching TP1 is considered achieving the minimum profit target. Note 2: *Shark patterns must be closed 100% at TP1 to maintain a positive expected value in the long run.

💡 Pro Tip: Look for patterns in the table where TP1% exceeds 60%. This indicates that for the current asset, that specific pattern has high reliability. A small number of patterns may trigger the PRZ and reach TP1 or higher without hitting SL, but due to Point D deviating excessively, they are not counted in the win rate. Therefore, a win rate above 60% is actionable.

Alerts

This indicator has a built-in real-time alert function, triggered when a Potential Pattern detects price entering the PRZ.

Setup Steps:
  1. Click the "Alert" button on the TradingView toolbar.
  2. In the Symbol dropdown, set alerts for 15-minute and 1-hour timeframes respectively for your entire watchlist.
  3. In the "Condition" menu, select <Elite> Auto HP [Trader-Alex].
  4. Select "Any alert() function call".
  5. Set your notification method (App Notification, Email, or Popup).
  6. Click "Create".
  7. When a new trading opportunity arises, you will receive a notification containing the Pattern Name, Direction (Bull/Bear), and specific Entry/TP/SL prices.

Trading Advice & Disclaimer

Trading Advice & Practical Details
  • Wait for Confirmation: Although the indicator shows "Potential Patterns" and "Suggested Entry Points," it is strongly recommended to wait for a Reversal Signal (e.g., Engulfing Candle, Long Wick) within the PRZ before entering.

For 4H patterns, look for 1H reversal candles.
For 1H patterns, look for 15M reversal candles, and so on.

  • Multi-Timeframe Confluence: When a large timeframe (e.g., 4 Hours) and a small timeframe (e.g., 15 Minutes) show harmonic patterns in the same direction within the same zone, the win rate is typically extremely high.

  • Pattern Confluence: When Point D of a completed pattern (currently holding a position) overlaps with Point C of a new potential pattern (moving towards a new PRZ Entry), consider using the new potential Point D (PRZ Entry) as TP3 for your original order.

  • Reference Statistics: Different assets (e.g., Gold vs. Bitcoin) and timeframes suit different harmonic patterns. Please adjust your strategy based on the dashboard data.

    Disclaimer
    This indicator serves solely as an auxiliary analysis tool. The provided Entry, Take Profit, and Stop Loss levels are based on mathematical geometric ratio calculations and are for academic research and discussion purposes. They do not constitute a guarantee of future price movements. Financial trading involves high risk; please strictly implement money management and assume full responsibility for your trading results.



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

    📘 使用手冊:<Elite> 全自動諧波型態識別系統產品概述
    <Elite> Auto Harmonic Patterns 是一款高階的技術分析工具,專為識別市場中的「諧波型態 (Harmonic Patterns)」,由Trader-Alex設計。

    不同於傳統指標僅掃描單一週期,本系統採用**「動態全域掃描」技術**,能自動在單一圖表上同時偵測短線波動與長線趨勢中的型態。它不僅能標記歷史型態以供回測,更能即時預測正在形成的潛在型態,並自動繪製潛在反轉區 (PRZ) 與止盈止損建議。
    註: PRZ、TP、SL都並非投資建議,本技術指標僅供學術學習研究使用。
    型態結構線 (XABCD Structure)

    在這份指標中,XABCD 連線的顏色取決於「型態名稱」,無論是看漲還是看跌,同一種型態都會顯示相同的顏色,方便您一眼識別結構類型:
  • 🦇 Bat (蝙蝠): 藍色
  • 🦇 Alt Bat (變形蝙蝠):靛色
  • 🦋 Gartley (加特利):綠色
  • 🦋 Butterfly (蝴蝶):橘色
  • 🦀 Crab (螃蟹):紫色
  • 🦀 Deep Crab (深海螃蟹):紅色
  • 🦈 Shark (鯊魚):青亮色
  • 🔊 Cypher (賽福):粉紅色
    如何分辨多空? 請查看 D 點旁邊的標籤文字,會明確標示 [Bullish] (看漲) 或 [Bearish] (看跌),標籤背景色會跟隨上述型態顏色。

    交易計畫線 (Entry、TP/SL Lines)

    📈 看漲交易 (Bullish Setup) - 做多
    進場線 (Entry): 白色(默認)
    止盈線 (TP1 / TP2): 綠色
    止損線 (SL): 紅色

    📉 看跌交易 (Bearish Setup) - 做空
    進場線 (Entry): 白色(默認)
    止盈線 (TP1 / TP2): 青藍色
    止損線 (SL): 紫紅色
    註: Entry顏色建議於亮色模式下設定黑色,並且於暗色模式下設定白色(默認)。
    潛在反轉區 (Potential Reversal Zone)
    當掃描到潛在型態(尚未完成)時,延伸出的矩形色塊顏色與該型態的代表色相同。
    例如:偵測到潛在 Butterfly,PRZ 色塊就是 橘色。
    例如:偵測到潛在 Bat,PRZ 色塊就是 藍色。
    參數設定說明 (Settings Guide)

    您可以透過指標設定面板調整運作方式。為了保持介面簡潔,參數分為以下群組:

    ⚙️ Scan Period Settings (掃描週期設定)

    控制系統如何「尋找」型態。本指標具備自動掃描功能,無需手動指定單一長度。

  • [默認] Real-time Sensitivity (K線即時靈敏度): 開啟後,系統會包含極短線的微小波動掃描,對於PRZ抓取靈敏度大幅度提升。
  • [可調整] Start Length (掃描週期下限): 設定掃描的最小結構大小(數值越小,抓到的型態越細微),最小數值為5。
  • [可調整] End Length (掃描週期上限): 設定掃描的最大結構大小(數值越大,抓到的型態越大,通常代表大趨勢),最大數值為500。
    建議:保持預設範圍即可覆蓋大部份市場波動。

    👁️ Pattern Visibility & Colors (型態開關與顏色)
  • [可調整] 開關 (Checkbox): 您可以單獨開啟或關閉特定的型態(例如只看 Gartley 或 Bat)。
  • [可調整] 顏色 (Color): 自定義每種型態在圖表上顯示的顏色,方便視覺區分。
  • 🎯 Style & TP/SL Settings (樣式與訂單設定)
  • [可調整] Bullish/Bearish Entry/TP/SL Colors: 自定義進場、止盈、止損線的顏色。
  • [可調整] Line Length Multiplier(線條長度倍數): 調整 TP/SL 線在圖表向右延伸的長度。
  • [可調整]History TP/SL/Entry Lines Count (顯示止盈/止損/進場線數量):如果填寫0,僅會顯示當前潛在型態止盈/止損/進場線;如果填寫1,則會顯示最近一次完成歷史型態的止盈/止損/進場線,最大數值為50。
  • [默認] Show Potential Patterns(顯示潛在型態): 是否顯示正在形成中的預測型態。
  • [可調整] Max Potential Count(最大顯示預測數量): 限制圖表上同時顯示的潛在型態數量,避免畫面過於雜亂。
  • [可調整] PRZ Extra Padding %(額外填充擴張): 調整潛在反轉區 (PRZ) 的寬度。增加此數值會讓反轉區範圍變大,容錯率更高,但也可能降低精確度。建議保持 0% 以維持精確度,除非您希望擴大捕捉範圍。
    📊 Statistics Table Settings (統計表格設定)

    控制右下角(或自訂位置)的績效統計面板。
  • [可調整] Show Statistics Table(顯示統計表): 開啟/關閉統計面板。
  • [可調整] Table Position(表格位置): 設定面板在圖表四個角落的位置。
  • [可調整] Text Size(文字大小): 調整表格文字大小。
  • 🧠 Core Logic (核心邏輯 - 進階)
  • [可調整] Tolerance % (容錯率): 設定型態識別的嚴格程度。
    容錯率數值越小:型態越標準、精確,但數量較少。
    容錯率數值越大:能偵測到更多變形型態,但可能包含數值型態比例較不標準的訊號。
    注意: 誤差大小與型態止盈不見得呈正向關係。
    [建議設置] 3~10%。
    統計儀表板解讀 (Statistics Dashboard)

    位於圖表角落的面板提供了該商品在當前時間級別的歷史回測數據:
  • Pattern: 型態名稱。
  • Total: 歷史上偵測到的總次數。
  • TP1 %: 價格觸發進場後,在碰到止損前,成功到達第一止盈點的機率。此位置需平倉50~60%倉位。
  • TP2 %: 價格觸發進場後,在碰到止損前,成功到達第二止盈點的機率。此位置需平倉25~50%倉位。
  • SL %: 觸發止損的機率。
    註1: TP1 %+SL % = 100%,TP1即算完成最低盈利目標。
    註2: ***鯊魚型態必須於TP1平倉100%,長期為正期望值。
    💡 使用技巧: 觀察表格中 TP1% 超過 60% 的型態,這代表在當前市場商品中,該特定型態的可靠度較高。少數型態會在觸發PRZ後,因為並未SL且達成TP1以上,但D點過份偏移,而無法計入勝率,因此60%以上勝率即可操作。
    警報設定 (Alerts)

    本指標內建即時警報功能,當潛在型態 (Potential Pattern) 偵測到價格進入反轉區 (PRZ) 時會觸發。

    設定步驟:
  • 點擊 TradingView 工具列的「警報 (Alert)」按鈕。
  • 在商品(Symbols)下拉選單,根據整個觀察清單分別設置15分K以及1H提醒通知
  • 在「條件 (Condition)」選單中,選擇 <Elite> Auto HP [Trader-Alex]。
  • 選擇 "Any alert() function call"。
  • 設定通知方式(App 推播、Email 或彈出視窗)。
  • 點擊「建立」。
  • 當新的交易機會出現時,您將會收到包含型態名稱、方向 (Bull/Bear) 以及具體 Entry/TP/SL 價格的通知。
    交易建議與免責聲明[交易建議與實踐細節補充]
  • 等待確認: 雖然指標顯示了「潛在型態」與「建議進場點」,但強烈建議等待 K 棒在 PRZ 區域內出現反轉訊號(如吞噬形態、長影線)後再進場。
  • 4H型態看1H反轉K,1H型態看15M反轉K,依此類推。
  • 多週期共振: 當大週期(如 4小時)與小週期(如 15分鐘)在同一區域出現相同方向的諧波型態時,勝率通常極高。
  • 型態共振: 當一個已完成型態的 D 點(持倉中),與新潛在型態的 C 點(正在往新 PRZ 的 Entry 方向邁進)重合時,可以考慮透過新潛在型態的 D 點(PRZ 的 Entry)作為原訂單的 TP3。
  • 參考統計: 不同商品(如黃金 vs. 比特幣)以及時間週期適合的諧波型態不同,請參考面板數據調整策略。

    免責聲明
    本指標僅作為輔助分析工具,所提供的進場、止盈與止損點位皆基於數學幾何比例計算,作為學術研究討論,不代表對未來價格波動的保證。金融交易具有高度風險,請務必嚴格執行資金管理,並自行承擔交易結果。
Информация о релизе
1. Optimized Potential Reversal Zone (PRZ) length.
2. Enhanced alert notification formatting.
3. Max Extension Safeguard.
Информация о релизе
This update addresses a visual and logical discrepancy found in the optimization calculation logic.

Fixed "Floating" Points: Resolved an issue where pattern vertices (specifically Point A) appeared detached or "floating" away from the candlestick wicks. This occurred because the algorithm updated the price for better extremes but occasionally failed to synchronize the corresponding timestamp.

Enhanced Precision: The scanner now strictly enforces time-price synchronization during the optimization phase. This ensures that all pattern points (X, A, B, C, D) are perfectly anchored to the exact High/Low of the respective candles.

Stricter Validation: By correcting the timestamp logic, the function now performs more accurate time-sequence checks, filtering out invalid patterns more effectively.


本次更新修正了核心邏輯中關於極值優化的運算細節,大幅提升了指標的視覺精確度。

修復點位「懸空」問題: 解決了型態頂點(特別是 A 點)在圖表上看起來與 K 線影線分離、未正確吸附的問題。此問題源於算法在搜尋更佳價格極值時,偶爾未同步更新對應的時間戳 。

提升繪圖精確度: 掃描器現在強制執行「時間-價格」同步機制。無論如何優化,所有型態點位(X, A, B, C, D)現在都會完美貼合在對應 K 線的最高或最低點上。

更嚴謹的驗證邏輯: 透過修復時間戳記函數現在能執行更精確的時間序列檢查,進一步過濾掉邏輯上不合理的無效型態。
Информация о релизе
🚀 Update: Enhanced Risk Management Visuals

To help traders make faster and smarter decisions, I have upgraded the Potential Pattern visual labels. You no longer need to calculate risk manually—the indicator now does it for you instantly!

New Features:

Stop Loss (SL) with Risk %: The SL label now displays the exact potential loss percentage from the Entry price.

Example: SL: 45000 (-1.50%)

Benefit: Instantly gauge your risk exposure before entering a trade.

Take Profit (TP) with R:R Ratio: Both TP1 and TP2 labels now explicitly show the Risk-to-Reward (R:R) Ratio.

Example: TP1: 46000 (R:R 1.50)

Benefit: Quickly identify high-quality setups where the potential reward justifies the risk.

Note:

All calculations are based on the pattern's ideal Entry point.

The display format is optimized to show clear decimals (e.g., 0.80% or R:R 2.50) for better readability.

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

🚀 更新:智慧風險與盈虧比顯示

為了幫助交易者做出更快速、更安全的決策,我升級了 潛在型態 (Potential Pattern) 的標籤顯示功能。現在您無需手動計算風險,指標會自動為您呈現關鍵數據!

新增功能:

止損 (SL) 顯示風險百分比: SL 標籤現在會直接顯示從入場點 (Entry) 到止損價格的 潛在虧損百分比。

顯示範例: SL: 45000 (-1.50%)

優勢: 讓您在進場前一眼就能掌握該筆交易的風險曝險程度。

止盈 (TP) 顯示盈虧比 (R:R): TP1 與 TP2 標籤現在都會明確顯示 風險回報比率 (Risk/Reward Ratio)。

顯示範例: TP1: 46000 (R:R 1.50)

優勢: 快速識別高盈虧比的優質交易機會,過濾掉不划算的型態。

備註:

所有數據皆基於型態的理想 入場點 (Entry) 自動計算。

數字格式已優化,無論數值大小(例如 0.80% 或 R:R 12.50)皆能清晰完整顯示。
Информация о релизе
Adjust Alert Msg
Информация о релизе
Enhanced pattern accuracy and value precision
Информация о релизе
Fixed: Filtered out signals where Entry, TP, or SL are < 0 on higher timeframes.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.