PROTECTED SOURCE SCRIPT

OB

39
**Precise Order Blocks (Unified Transparency)**

---

**Indicator Overview**

"Precise Order Blocks" is a powerful technical indicator designed to automatically identify and plot **Order Blocks** in the market. It detects both bullish and bearish order blocks and provides advanced features to help traders accurately analyze price action and potential trading opportunities.

The core design principle of this indicator is not just to mark areas but to include a dynamic management system. This ensures a clean and effective chart, displaying only the currently valid order blocks.

**Key Features**

* **Automatic Detection:** Automatically identifies and plots both bullish and bearish order blocks.
* **Dynamic Extension:** All valid order blocks will automatically extend to the right along with the price action, helping you track their influence.
* **Order Block Lifecycle Management:**
* **Precise Invalidation Logic:** Order blocks are automatically removed from the chart when their validity is compromised by a price breach. You can choose whether a **wick breakout** or a **body (close price) breakout** is required for invalidation.
* **Overlap Prevention:** The detection logic prevents new order blocks that overlap with or are contained within existing ones from being plotted, keeping your chart clean.
* **Candle Engulfing Reversal:** When an order block is completely engulfed by a reverse-direction candle, the indicator will automatically flip its direction, capturing rapid shifts in market sentiment.
* **Customizable Visuals:** You have full control over the color and transparency of the order blocks and their midlines to match your chart style.

**Parameter Settings**

* `Show Bullish OB`: Toggle the display of bullish order blocks.
* `Show Bearish OB`: Toggle the display of bearish order blocks.
* `Bullish OB Color`: Set the color for bullish order blocks.
* `Bearish OB Color`: Set the color for bearish order blocks.
* `Midline Color`: Set the color for the midline of the order blocks.
* `Max Lookback`: Limits the lookback range for the indicator's detection to avoid plotting overly old order blocks.
* `Wick Breakout Invalidation`: When enabled, a candle's wick passing through the order block area will be considered an invalidation. When disabled, only the close price passing through will invalidate it.
* `Revert on Engulfing`: When enabled, an order block will automatically reverse its direction if it's completely engulfed by an opposing candle.

**Suggested Use**

This indicator is highly effective when combined with other trading strategies, such as confirming breakouts, identifying support or resistance zones, or pairing with momentum indicators to gauge trend strength. The midline of the order block can serve as a potential price target for a bounce or a breakout.

To achieve the best visual and analytical results, we recommend adjusting the **Max Lookback** and **Invalidation** settings based on your specific trading style and time frame.


精準訂單塊(統一透明度)

---

指標簡介

「精準訂單塊」是一個型態技術指標,專為識別和繪製市場中的**訂單塊 (Order Blocks)** 而設計。它能自動偵測多頭和空頭的訂單塊,並提供進階功能,幫助交易者更精準地分析價格行為和潛在的交易機會。

本指標的設計理念不僅是簡單地標記區域,更加入了動態管理機制,以確保圖表乾淨且有效,只顯示當前有效的訂單塊。

指標功能特色

* **自動偵測訂單塊**:能自動識別並繪製看漲(多頭)和看跌(空頭)的訂單塊。
* **動態延伸**:所有有效的訂單塊都會隨價格走勢向右延伸,幫助你追蹤其影響力。
* **訂單塊生命週期管理**:
* **精準失效邏輯**:訂單塊會在其有效性被價格突破時自動消失。你可以選擇是**影線突破**還是**實體(收盤價)突破**才算失效。
* **避免重複**:偵測邏輯會排除與現有訂單塊重疊或包含在其中的新訂單塊,避免圖表混亂。
* **K 棒吞噬反轉**:當訂單塊被一根反向的 K 棒完全吞噬時,本指標會將其自動反轉為新的訂單塊,捕捉市場情緒的快速轉變。
* **可自訂視覺效果**:你可以自由調整訂單塊與中線的顏色、透明度,以適應你的圖表風格。

參數設定

* `顯示看漲訂單塊`:開啟或關閉看漲訂單塊的顯示。
* `顯示看跌訂單塊`:開啟或關閉看跌訂單塊的顯示。
* `看漲訂單塊顏色`:設定看漲訂單塊的顏色。
* `看跌訂單塊顏色`:設定看跌訂單塊的顏色。
* `中線顏色`:設定訂單塊中線的顏色。
* `最大回溯 K 棒數`:限制指標回溯偵測的範圍,避免顯示過於老舊的訂單塊。
* `影線突破就算失效`:當此選項開啟,K 棒的影線穿過訂單塊區域即視為失效;關閉則只有收盤價穿過才算失效。
* `K 棒吞噬時反向`:開啟此選項後,當訂單塊被反向 K 棒完全吞噬時,會自動反轉其方向。

使用建議

本指標非常適合與其他交易策略結合使用,例如確認突破、尋找支撐或阻力區域、或是與動量指標搭配來判斷趨勢強度。它提供的訂單塊中線可以用作潛在的價格反彈或突破目標。

在使用時,建議根據你的交易風格和時間週期,調整**最大回溯 K 棒數**和**失效條件**,以達到最佳的視覺與分析效果。

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.