OPEN-SOURCE SCRIPT
Atualizado ORB + Liquidity Sweeps

**Title:** ORB + Liquidity Sweeps
**Description:**
The **“ORB + Liquidity Sweeps”** indicator combines the *Opening Range Breakout (ORB)* model with dynamic *liquidity sweep detection* to identify high-probability reversal or continuation setups during key session periods. This script visually maps where price sweeps liquidity at highs/lows and tracks how those sweeps interact with the defined ORB range — offering clear, data-driven confluence zones for professional intraday execution.
---
### 🔹 FEATURES OVERVIEW
**1. Liquidity Sweeps [SB1]**
* Detects **bullish** and **bearish liquidity grabs** using swing highs/lows based on user-defined pivot length.
* Supports three detection modes:
* **Only Wicks:** Marks when price pierces a level with a wick and rejects.
* **Only Outbreaks & Retest:** Confirms full breaks and retests.
* **Wicks + Outbreaks & Retest:** Combines both behaviors for full context.
* Automatically shades sweep zones and extends them until price mitigates or breaks through.
* Visuals:
* 🟩 **Bullish sweeps** = green wick/zone
* 🟥 **Bearish sweeps** = red wick/zone
* Configurable color transparency, max bar extension, and style options.
* Generates real-time **alerts** for each sweep:
* `🔼 Bullish Wick Sweep detected`
* `🔽 Bearish Wick Sweep detected`
---
**2. Opening Range Breakout (ORB)**
* Automatically defines the **Opening Range** using a customizable session window (default: *09:30–09:45 EST*).
* Tracks **ORB High** and **ORB Low** in real time.
* Displays the range only on intraday charts within the selected time window.
* Sends breakout alerts:
* `ORB Breakout Up` → Price crosses above ORB high.
* `ORB Breakout Down` → Price crosses below ORB low.
* Ideal for identifying initial volatility expansion zones and potential directional bias for the session.
---
**3. ORB–Liquidity Sweep Interaction**
* Highlights when **liquidity sweep zones overlap or touch the ORB range**, signaling a high-interest confluence zone.
* Issues alerts when interaction occurs:
* `Bull Sweep interacts with ORB`
* `Bear Sweep interacts with ORB`
* Useful for traders looking to align **liquidity events with session structure** to time entries.
---
**4. Built-in Alert System**
All alerts are pre-configured and can be activated directly from the TradingView “Add Alert” menu:
* **Bullish Wick Sweep**
* **Bearish Wick Sweep**
* **ORB Breakout Up**
* **ORB Breakout Down**
* **Bull Sweep interacts with ORB**
* **Bear Sweep interacts with ORB**
---
### ⚙️ HOW TO USE
1. **Add to Chart:** Apply on any intraday timeframe (preferably 1–15 min).
2. **Configure ORB Window:** Set the session start and duration (e.g., `09:30–09:45`options , 08:30 -08:45 futures ) for your trading region.
3. **Select Sweep Mode:** Choose from “Only Wicks,” “Only Outbreaks & Retest,” or “Wicks + Outbreaks & Retest.”
4. **Watch for Confluence:**
* A **sweep near ORB levels** often signals exhaustion or potential reversal.
* A **breakout through ORB following a sweep** suggests momentum continuation.
5. **Set Alerts:** Enable relevant alerts for automatic notifications when sweeps or ORB breaks occur.
---
### 📊 TRADING APPLICATIONS
* Identify **stop hunts** and **liquidity grabs** around ORB levels.
* Combine with volume, delta, or order flow indicators for confirmation.
* Use confluence zones (Sweep + ORB overlap) as **entry or take-profit** points.
* Excellent for **index futures**, **forex**, and **high-volume equities** during the opening session.
---
**Developed by:** SB
**Category:** Price Action / Liquidity / Session Structure
**Compatible Timeframes:** Intraday (1m–5m recommended)
**Alerts Included:** ✅
**Overlay:** Yes
**Version:** v6
---
*This tool is designed for advanced price-action traders who study liquidity behavior, ORB structure, and intraday expansion patterns.*
**Description:**
The **“ORB + Liquidity Sweeps”** indicator combines the *Opening Range Breakout (ORB)* model with dynamic *liquidity sweep detection* to identify high-probability reversal or continuation setups during key session periods. This script visually maps where price sweeps liquidity at highs/lows and tracks how those sweeps interact with the defined ORB range — offering clear, data-driven confluence zones for professional intraday execution.
---
### 🔹 FEATURES OVERVIEW
**1. Liquidity Sweeps [SB1]**
* Detects **bullish** and **bearish liquidity grabs** using swing highs/lows based on user-defined pivot length.
* Supports three detection modes:
* **Only Wicks:** Marks when price pierces a level with a wick and rejects.
* **Only Outbreaks & Retest:** Confirms full breaks and retests.
* **Wicks + Outbreaks & Retest:** Combines both behaviors for full context.
* Automatically shades sweep zones and extends them until price mitigates or breaks through.
* Visuals:
* 🟩 **Bullish sweeps** = green wick/zone
* 🟥 **Bearish sweeps** = red wick/zone
* Configurable color transparency, max bar extension, and style options.
* Generates real-time **alerts** for each sweep:
* `🔼 Bullish Wick Sweep detected`
* `🔽 Bearish Wick Sweep detected`
---
**2. Opening Range Breakout (ORB)**
* Automatically defines the **Opening Range** using a customizable session window (default: *09:30–09:45 EST*).
* Tracks **ORB High** and **ORB Low** in real time.
* Displays the range only on intraday charts within the selected time window.
* Sends breakout alerts:
* `ORB Breakout Up` → Price crosses above ORB high.
* `ORB Breakout Down` → Price crosses below ORB low.
* Ideal for identifying initial volatility expansion zones and potential directional bias for the session.
---
**3. ORB–Liquidity Sweep Interaction**
* Highlights when **liquidity sweep zones overlap or touch the ORB range**, signaling a high-interest confluence zone.
* Issues alerts when interaction occurs:
* `Bull Sweep interacts with ORB`
* `Bear Sweep interacts with ORB`
* Useful for traders looking to align **liquidity events with session structure** to time entries.
---
**4. Built-in Alert System**
All alerts are pre-configured and can be activated directly from the TradingView “Add Alert” menu:
* **Bullish Wick Sweep**
* **Bearish Wick Sweep**
* **ORB Breakout Up**
* **ORB Breakout Down**
* **Bull Sweep interacts with ORB**
* **Bear Sweep interacts with ORB**
---
### ⚙️ HOW TO USE
1. **Add to Chart:** Apply on any intraday timeframe (preferably 1–15 min).
2. **Configure ORB Window:** Set the session start and duration (e.g., `09:30–09:45`options , 08:30 -08:45 futures ) for your trading region.
3. **Select Sweep Mode:** Choose from “Only Wicks,” “Only Outbreaks & Retest,” or “Wicks + Outbreaks & Retest.”
4. **Watch for Confluence:**
* A **sweep near ORB levels** often signals exhaustion or potential reversal.
* A **breakout through ORB following a sweep** suggests momentum continuation.
5. **Set Alerts:** Enable relevant alerts for automatic notifications when sweeps or ORB breaks occur.
---
### 📊 TRADING APPLICATIONS
* Identify **stop hunts** and **liquidity grabs** around ORB levels.
* Combine with volume, delta, or order flow indicators for confirmation.
* Use confluence zones (Sweep + ORB overlap) as **entry or take-profit** points.
* Excellent for **index futures**, **forex**, and **high-volume equities** during the opening session.
---
**Developed by:** SB
**Category:** Price Action / Liquidity / Session Structure
**Compatible Timeframes:** Intraday (1m–5m recommended)
**Alerts Included:** ✅
**Overlay:** Yes
**Version:** v6
---
*This tool is designed for advanced price-action traders who study liquidity behavior, ORB structure, and intraday expansion patterns.*
Notas de Lançamento
fixed bug on alert my apologies Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Script de código aberto
No verdadeiro espirito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam entendê-lo e verificá-lo. Parabéns ao autor Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações e regida pelas Regras da Casa.
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.