OPEN-SOURCE SCRIPT

Pin Bar Highlighter Only

265
Absolutely — here’s a full **description and breakdown** of what the script does:

---

## 📜 Script Name:

**"Pin Bar Highlighter Only"**

---

## 🎯 Purpose:

This script **detects and highlights classic pin bar reversal candles** directly on the chart — without plotting any entry, stop loss, or take profit levels.

It’s designed for traders who:

* Want to manually assess trades
* Prefer a clean chart
* Use pin bar price action as a signal for potential reversals

---

## ✅ What It Does:

* **Scans each candle** to check if it qualifies as a **bullish** or **bearish pin bar**
* If valid:

* Plots a **green triangle below** bullish pin bars
* Plots a **red triangle above** bearish pin bars
* Keeps your chart **minimal and uncluttered**

---

## 📌 How It Detects a Pin Bar:

### 🔹 1. Candle Structure:

* Measures the total candle range: `high - low`
* Calculates the **body size**: `abs(close - open)`
* Calculates the **upper and lower wick sizes**

### 🔹 2. Pin Bar Criteria:

* The **wick (nose)** must be at least **2/3 of the total candle length**
* The **body** must be small — **≤ 1/3** of the total range
* The **body** must be located at **one end** of the candle
* The wick must **pierce the high/low** of the previous candle

---

## 📍 Bullish Pin Bar Requirements:

* Close > Open (green candle)
* Lower wick ≥ 66% of candle range
* Body ≤ 33% of range
* Candle **makes a new low** (current low < previous low)

### 📍 Bearish Pin Bar Requirements:

* Close < Open (red candle)
* Upper wick ≥ 66% of candle range
* Body ≤ 33% of range
* Candle **makes a new high** (current high > previous high)

---

## 🖼️ Visual Output:

* 🔻 Red triangle **above** bearish pin bars
* 🔺 Green triangle **below** bullish pin bars

---

## 🛠️ Example Use Cases:

* Identify **reversal points** at support/resistance
* Confirm signals with **VWAP**, supply/demand zones, or AVWAP (manually plotted)
* Use in **conjunction with other strategies** — without clutter

---

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.