OPEN-SOURCE SCRIPT

GapCluster SR For Intraday by Chaitu50c

111
**GapCluster SR For Intraday by Chaitu50c**

**Overview**
GapCluster SR plots dynamic intraday support and resistance lines based on candle-to-candle gaps. Whenever an Open/Close or High/Low gap is detected, the script draws a horizontal level and “clusters” nearby gaps into a single line to keep your chart clean. Lines automatically color-code relative to price—green when below, red when above.

---

**Key Features**

* **Gap Detection Modes**: Choose between Open/Close gaps (default) or High/Low gaps.
* **Clustering**: Merge levels within a user-defined vertical range to avoid clutter.
* **Dynamic Coloring**: Levels below price turn green; levels above price turn red.
* **Session Reset**: Automatically removes levels older than X days.
* **Fully Customizable**: Adjust buffer, cluster range, line width, lookback period, and both above/below colors.

---

**Inputs**

| Input | Default | Description |
| ---------------------------- | :--------: | ------------------------------------------- |
| Gap Type | Open/Close | Select gap detection method |
| Price Buffer (points) | 5.0 | Maximum distance for gap matching |
| Cluster Range (points) | 100.0 | Vertical distance within which levels merge |
| Line Width | 2 | Thickness of plotted lines |
| Days to Include | 14 | Number of days to retain past levels |
| Color for Levels Above Price | red | Line color when level > current price |
| Color for Levels Below Price | green | Line color when level < current price |

---

**How to Use**

1. **Add to Chart**: Apply on any intraday timeframe (1 min, 5 min, etc.).
2. **Select Mode**: Pick Open/Close or High/Low in settings.
3. **Tweak Inputs**: Raise/lower buffer for tighter/looser gap detection; adjust cluster range to group levels; change lookback (“Days to Include”) to control session reset.
4. **Interpret Levels**:

* **Green Lines** mark potential support zones.
* **Red Lines** mark potential resistance zones.
5. **Combine with Your Strategy**: Use alongside volume, momentum, or trend filters for confirmation.

---

**Tips & Tricks**

* **Intraday Entries**: Look for price reaction at green (support) lines for long setups, or red (resistance) lines for shorts.
* **Filter Noise**: Increase the “Cluster Range” to consolidate many close levels into stronger, singular lines.
---

**Disclaimer**
This indicator is provided “as-is” for educational purposes only. Always backtest any setup and practice proper risk management.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.