PROTECTED SOURCE SCRIPT
Updated

Support & Resistance Zones + FVG

102
**Overview:**
This tool automatically identifies **key support and resistance levels** and highlights **Fair Value Gaps (FVGs)** on the chart. It helps traders of all levels **visualize important price areas**, spot potential market reactions, and make better-informed trading decisions.

Support and resistance zones are areas where price tends to **reverse, stall, or accelerate**, making them essential for entries, exits, and stop-loss placement. Fair Value Gaps represent rapid price movements that leave temporary imbalances, which often act as **future targets or reversal points**. Together, these features provide a **comprehensive view of market structure**.

---

## Features:

1. **Automatic Support & Resistance Detection:**

* Detects zones based on recent price action patterns:

* **Bull-to-Bear transitions** → resistance zones
* **Bear-to-Bull transitions** → support zones
* Dynamically calculates **zone heights** based on recent candle ranges, adapting to market volatility.

2. **Broken Zones & Proximity Alerts:**

* Highlights zones that have been broken, helping traders **focus on relevant levels**.
* Optional proximity alerts indicate broken zones that are **near the current price**, showing potential retests.

3. **Fair Value Gaps (FVGs):**

* Detects bullish and bearish gaps automatically.
* Options to **ignore narrow gaps** and **remove fully crossed FVGs**.
* Acts as a guide for potential **price targets or reversal areas**.

4. **Clean Chart & Customization:**

* Hides overlapping or invalid zones to reduce clutter.
* Fully adjustable inputs, including:

* Zone length
* Lookback range
* Zone height multiplier
* FVG extension
* Display and opacity settings

5. **Timeframe-Independent:**

* Works on **any chart interval**, from scalping to long-term swing charts.

---

## How It Helps Traders:

* **Identify Key Levels Automatically:**
Visualizes areas where the price has historically reacted. These zones act as **natural barriers** guiding entries and exits.

* **Spot Broken Zones:**
Broken zones may lose significance but could act as **future retest points**, helping assess trend continuation or reversal.

* **Visualize Price Gaps (FVGs):**
Gaps left by rapid price movement often act as **price magnets**, providing potential targets or reversal points.

* **Reduce Noise:**
Automatically hides overlapping or invalid zones for a **cleaner, easier-to-read chart**, highlighting only the most significant levels.

* **Adaptable to Any Trading Style:**
Useful for **swing trading, intraday trading, or scalping**, showing where buyers and sellers are most active.

---

## Practical Usage Guide:

1. **Enable Support & Resistance Zones:**

* Visualize critical price levels.
* Adjust **zone length, lookback range, and height multiplier** to fit your trading style and volatility.

2. **Enable FVGs:**

* Highlights gaps created by rapid price movements.
* Customize **minimum gap size, extension, and filtering options** to reduce chart noise.

3. **Observe Price Reactions:**

* **Bounce at support:** Potential buy opportunity.
* **Reversal at resistance:** Potential sell/short opportunity.
* **Breakout:** Watch for price breaking a zone for trend continuation trades.

4. **Risk Management:**

* Place stop-loss orders just outside zones to protect trades.
* Use broken zones as **profit targets** or areas to tighten stops.

5. **Trend Analysis:**

* Understand where buyers and sellers are concentrated.
* Identify strong trends by observing multiple zones being respected or broken.

6. **Multi-Timeframe Application:**

* Apply on different timeframes to **align short-term entries with longer-term structure**, improving trade probability.

---

## Key Inputs & Customizations:

* **Support & Resistance Zones:**

* Show/Hide Zones
* Zone Length Extend (bars)
* Loopback Range (bars)
* Zone Height Multiplier
* Hide Overlapped Zones
* Hide Broken Zones
* Ignore Last N Candles for Break Check
* Show Proximity Broken Zones
* Proximity Range for Broken Zones

* **Fair Value Gaps (FVGs):**

* Show/Hide FVGs
* Extend FVGs (bars)
* Minimum FVG Size
* Ignore Narrow FVGs
* Ignore Fully Crossed FVGs
* Up and Down Colors with Opacity

---

**Summary:**
This indicator saves **time, improves chart clarity, and highlights key market levels**. It is suitable for beginners who want to **understand market structure visually**, as well as experienced traders seeking **precise entry, exit, and target zones**. By combining support/resistance detection with Fair Value Gaps, it provides a **complete visual guide to price behavior**, helping traders make **more confident and informed decisions**.

Release Notes
Indicator rename
Release Notes
Clean up some commented lines
Release Notes
Minor changes + clean up
Release Notes
Redefining FVG
Release Notes
FVG modification
Release Notes
Update: Internal & External Market Structure Added
This version introduces Market Structure visualization — a powerful addition that helps traders clearly identify trend shifts and structural breaks.
🧩 New Feature Overview:
Internal & External Structure Detection:
Internal Structure highlights short-term swing changes to track micro-trends.
External Structure captures major swing points, reflecting the dominant market direction.
Automatic Swing Identification:
The script automatically detects swing highs and lows based on user-defined sensitivity (Internal Swing Length and External Swing Length).
Market Structure Labels:
CHoCH / CHoCH+ (Change of Character): Signals a possible trend reversal when the market breaks the previous structure in the opposite direction.
BoS / BoS+ (Break of Structure): Indicates trend continuation, confirming that the market is maintaining its direction.
Customizable Display:
You can choose to show only Internal, only External, or Both structures.
The internal structure is drawn with dashed lines, while the external uses solid lines for clear distinction.
Dynamic Color Coding:
Bullish Structure: Teal lines and labels
Bearish Structure: Red lines and labels
⚙️ Inputs Added:
Internal Swing Length → Defines how sensitive internal swings are to short-term changes.
External Swing Length → Controls how broad or strong the external structure is.
Show Internal/External Market Structure → Choose between Both, Internal only, or External only.
Bullish/Bearish Market Structure Color → Customize visual colors for clarity.
📈 How It Helps Traders:
Clearly visualize trend direction and structural shifts.
Combine with Support/Resistance Zones and FVGs for deeper confluence.
Identify trend reversals early (via CHoCH) or continuations (via BoS).
Great for both price action traders and smart money concepts (SMC) practitioners.
This addition transforms the script into a complete market structure toolkit, offering zones, FVGs, and structure analysis all in one indicator.
Release Notes
Chart update
Release Notes
Added an "Enable Market Structure" checkbox under the Internal/External Market Structure group.
This new option allows users to quickly toggle all Market Structure (Internal, External, or Both) visualizations on or off without changing other settings. It improves chart clarity and performance when users want to temporarily hide market structure elements while keeping Support/Resistance and Fair Value Gaps visible.
Release Notes
Renamed toggle

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.