PROTECTED SOURCE SCRIPT
Atualizado Smart Swing & Order Block Pro v1

📌 Smart Swing & Order Block Pro v1
The Smart Swing & Order Block Pro v1 indicator is an advanced tool designed for traders who use Smart Money Concepts, institutional analysis, and deep market-structure reading. It combines precise Order Block detection, intelligent classification, reliable swing identification, and professional volume/delta filtering to deliver a clean, structured, and actionable view of price behavior.
🎯 Indicator Purpose
Provide a consistent, clean, and verifiable identification of institutional zones (OBs), their evolution over time, their break and mitigation events, and a complete structural reading of swings and trend direction.
This indicator replaces the typical noise found in standard OB tools with a robust system based on:
OBs validated by volume and delta
Dynamic OB classification (Extreme, Mitigated, Breaker, Intermediate)
Clean visual separation between intact and broken OBs
Accurate Swing High / Swing Low detection using dynamic pivots
Visual panels with quantitative swing and OB statistics
🧠 Key Features
1. Precision Order Block Detection
The indicator identifies bullish and bearish Order Blocks using a combination of:
Market structure
Validated breakouts
Optional filtering via relative volume (RVOL)
Normalized delta filtering to measure directional intent
This prevents low-quality or non-institutional OBs from being drawn.
2. Intelligent OB Classification
Each detected OB is automatically assigned a structural role:
🔹 Extreme OB
The origin point of a movement (up leg or down leg).
Crucial for spotting institutional footprints and major displacement zones.
🔹 Mitigated OB
An OB already tapped or partially consumed by price.
Useful for identifying weakened zones or controlled pullbacks.
🔹 Breaker OB
An OB broken by price in the opposite direction.
The box is visually split into two parts:
Left section → original OB color
Right section → breaker color
🔹 Intermediate OB
Active OBs that do not meet the criteria above.
3. Professional OB Visualization
OBs automatically extend to the right.
Broken OBs show a clear color split (intact vs. breaker).
Mitigated OBs update color automatically.
Extreme OBs are highlighted with a special color.
Automatic cleanup of boxes and lines for performance and clarity.
4. Ultra-Precise Swing Detection
Unlike standard swing indicators:
Uses configurable pivot strengths
Marks the exact candle that created the swing
Avoids excessive false signals
Draws clean swing-high and swing-low lines
Places crosses exactly when price breaks a swing
This results in a perfectly readable structure (HH, HL, LH, LL).
5. Dynamic Panels
The script includes two optional informational panels:
📊 Swing Panel
Displays:
Average bars between swing highs
Average bars between swing lows
Current trend based on structure (UP / DOWN / RANGE)
📉 OB Panel
Displays counts of:
Bullish Extreme
Bullish Mitigated
Bearish Extreme
Bearish Mitigated
Perfect for evaluating institutional strength and directional bias.
⚙️ Configurable Options
Swing strength (independent lookback for high/low)
Use of candle body vs. wicks
Volume/delta filter modes (Strict, Normal, Loose)
Toggle visibility of OBs, swings, and panels
Color themes per OB classification
Panel positioning (Top Left / Top Right)
🎨 Clean and Professional Visualization
The indicator focuses on:
Clarity
Structural accuracy
Immediate interpretability
Institutional-grade behavior
Real reaction zones
Nothing unnecessary, nothing noisy — just clean structure.
🚀 Who Is This Indicator For?
Ideal for traders using:
Smart Money Concepts (SMC)
ICT-style analysis
Wyckoff methodology
Order Flow
Swing trading based on structure
Algorithmic OB logic
Strategies based on breakers, traps, and displacement
Paneles gráficos informativos sobre swings y OB.
🧠 Funcionalidades Principales
1. Detección Precisa de Order Blocks (OB)
El indicador identifica OB alcistas y bajistas usando una combinación de:
Estructura de precio
Rupturas validadas
Filtro opcional por volumen relativo (RVOL)
Filtro por delta normalizado (direccionalidad del cuerpo de la vela)
Esto evita identificar OB sin relevancia institucional.
2. Clasificación Inteligente de OB
Cada OB detectado recibe una etiqueta automática según su importancia estructural:
🔹 Extreme
Es el OB origen del movimiento (up leg o down leg).
Fundamental para identificar desplazamientos fuertes y zonas institucionales críticas.
🔹 Mitigated
OB ya tocado, parcialmente consumido o con interacción del precio.
Ideal para detectar zonas debilitadas o retrocesos controlados.
🔹 Breaker
OB que fue roto por el precio en sentido contrario.
La caja se divide visualmente en dos colores:
Parte izquierda = color del OB original
Parte derecha = color de breaker
🔹 Intermediate
OB activos que aún no pertenecen a las categorías anteriores.
3. Visualización Profesional de Order Blocks
Los OB se extienden hacia la derecha.
Los breakers se dividen en color original y color de ruptura.
Los OB mit igados cambian automáticamente de color.
Los OB extremos destacan con un color especial.
Limpieza automática de cajas y líneas.
4. Swings Ultra Precisos
A diferencia del detector estándar de swings:
Usa pivotes configurables
Marca correctamente la vela que originó el swing
Evita el exceso de falsos positivos
Genera líneas limpias de swing high y low
Coloca cruces exactamente donde el precio rompe el swing
Esto permite medir estructura (HH, HL, LH, LL) de forma clara.
5. Paneles Dinámicos
El script incorpora dos paneles opcionales:
📊 Panel de Swings
Incluye:
Promedio de barras entre swings high
Promedio de barras entre swings low
Tendencia actual basada en estructura (UP / DOWN / RANGE)
📉 Panel de OB
Muestra conteos de:
Bullish Extreme
Bullish Mitigated
Bearish Extreme
Bearish Mitigated
Ideal para medir fuerza institucional y bias del mercado.
⚙️ Opciones Ajustables
Fuerza del swing (lookback independiente para high/low)
Uso del cuerpo/candlestick o mechas en la lógica
Filtro de volumen/delta (Strict, Normal, Loose)
Visualización de OB, Swings y Paneles
Estilos de color por cada tipo de OB
Posición de paneles (Top Left / Top Right)
🎨 Visualización Limpia y Profesional
El indicador prioriza:
Claridad
Estructura
Lectura inmediata
Comportamiento “institucional”
Zonas de reacción reales
No pinta elementos innecesarios y mantiene un diseño elegante y minimalista.
🚀 ¿Para quién está diseñado?
Ideal para traders que utilizan:
Smart Money Concepts
Wyckoff
Order Flow
ICT / SMC
Swing trading basado en estructura
Trading algorítmico basado en OB
Estrategias basadas en trampas y breakers
The Smart Swing & Order Block Pro v1 indicator is an advanced tool designed for traders who use Smart Money Concepts, institutional analysis, and deep market-structure reading. It combines precise Order Block detection, intelligent classification, reliable swing identification, and professional volume/delta filtering to deliver a clean, structured, and actionable view of price behavior.
🎯 Indicator Purpose
Provide a consistent, clean, and verifiable identification of institutional zones (OBs), their evolution over time, their break and mitigation events, and a complete structural reading of swings and trend direction.
This indicator replaces the typical noise found in standard OB tools with a robust system based on:
OBs validated by volume and delta
Dynamic OB classification (Extreme, Mitigated, Breaker, Intermediate)
Clean visual separation between intact and broken OBs
Accurate Swing High / Swing Low detection using dynamic pivots
Visual panels with quantitative swing and OB statistics
🧠 Key Features
1. Precision Order Block Detection
The indicator identifies bullish and bearish Order Blocks using a combination of:
Market structure
Validated breakouts
Optional filtering via relative volume (RVOL)
Normalized delta filtering to measure directional intent
This prevents low-quality or non-institutional OBs from being drawn.
2. Intelligent OB Classification
Each detected OB is automatically assigned a structural role:
🔹 Extreme OB
The origin point of a movement (up leg or down leg).
Crucial for spotting institutional footprints and major displacement zones.
🔹 Mitigated OB
An OB already tapped or partially consumed by price.
Useful for identifying weakened zones or controlled pullbacks.
🔹 Breaker OB
An OB broken by price in the opposite direction.
The box is visually split into two parts:
Left section → original OB color
Right section → breaker color
🔹 Intermediate OB
Active OBs that do not meet the criteria above.
3. Professional OB Visualization
OBs automatically extend to the right.
Broken OBs show a clear color split (intact vs. breaker).
Mitigated OBs update color automatically.
Extreme OBs are highlighted with a special color.
Automatic cleanup of boxes and lines for performance and clarity.
4. Ultra-Precise Swing Detection
Unlike standard swing indicators:
Uses configurable pivot strengths
Marks the exact candle that created the swing
Avoids excessive false signals
Draws clean swing-high and swing-low lines
Places crosses exactly when price breaks a swing
This results in a perfectly readable structure (HH, HL, LH, LL).
5. Dynamic Panels
The script includes two optional informational panels:
📊 Swing Panel
Displays:
Average bars between swing highs
Average bars between swing lows
Current trend based on structure (UP / DOWN / RANGE)
📉 OB Panel
Displays counts of:
Bullish Extreme
Bullish Mitigated
Bearish Extreme
Bearish Mitigated
Perfect for evaluating institutional strength and directional bias.
⚙️ Configurable Options
Swing strength (independent lookback for high/low)
Use of candle body vs. wicks
Volume/delta filter modes (Strict, Normal, Loose)
Toggle visibility of OBs, swings, and panels
Color themes per OB classification
Panel positioning (Top Left / Top Right)
🎨 Clean and Professional Visualization
The indicator focuses on:
Clarity
Structural accuracy
Immediate interpretability
Institutional-grade behavior
Real reaction zones
Nothing unnecessary, nothing noisy — just clean structure.
🚀 Who Is This Indicator For?
Ideal for traders using:
Smart Money Concepts (SMC)
ICT-style analysis
Wyckoff methodology
Order Flow
Swing trading based on structure
Algorithmic OB logic
Strategies based on breakers, traps, and displacement
Paneles gráficos informativos sobre swings y OB.
🧠 Funcionalidades Principales
1. Detección Precisa de Order Blocks (OB)
El indicador identifica OB alcistas y bajistas usando una combinación de:
Estructura de precio
Rupturas validadas
Filtro opcional por volumen relativo (RVOL)
Filtro por delta normalizado (direccionalidad del cuerpo de la vela)
Esto evita identificar OB sin relevancia institucional.
2. Clasificación Inteligente de OB
Cada OB detectado recibe una etiqueta automática según su importancia estructural:
🔹 Extreme
Es el OB origen del movimiento (up leg o down leg).
Fundamental para identificar desplazamientos fuertes y zonas institucionales críticas.
🔹 Mitigated
OB ya tocado, parcialmente consumido o con interacción del precio.
Ideal para detectar zonas debilitadas o retrocesos controlados.
🔹 Breaker
OB que fue roto por el precio en sentido contrario.
La caja se divide visualmente en dos colores:
Parte izquierda = color del OB original
Parte derecha = color de breaker
🔹 Intermediate
OB activos que aún no pertenecen a las categorías anteriores.
3. Visualización Profesional de Order Blocks
Los OB se extienden hacia la derecha.
Los breakers se dividen en color original y color de ruptura.
Los OB mit igados cambian automáticamente de color.
Los OB extremos destacan con un color especial.
Limpieza automática de cajas y líneas.
4. Swings Ultra Precisos
A diferencia del detector estándar de swings:
Usa pivotes configurables
Marca correctamente la vela que originó el swing
Evita el exceso de falsos positivos
Genera líneas limpias de swing high y low
Coloca cruces exactamente donde el precio rompe el swing
Esto permite medir estructura (HH, HL, LH, LL) de forma clara.
5. Paneles Dinámicos
El script incorpora dos paneles opcionales:
📊 Panel de Swings
Incluye:
Promedio de barras entre swings high
Promedio de barras entre swings low
Tendencia actual basada en estructura (UP / DOWN / RANGE)
📉 Panel de OB
Muestra conteos de:
Bullish Extreme
Bullish Mitigated
Bearish Extreme
Bearish Mitigated
Ideal para medir fuerza institucional y bias del mercado.
⚙️ Opciones Ajustables
Fuerza del swing (lookback independiente para high/low)
Uso del cuerpo/candlestick o mechas en la lógica
Filtro de volumen/delta (Strict, Normal, Loose)
Visualización de OB, Swings y Paneles
Estilos de color por cada tipo de OB
Posición de paneles (Top Left / Top Right)
🎨 Visualización Limpia y Profesional
El indicador prioriza:
Claridad
Estructura
Lectura inmediata
Comportamiento “institucional”
Zonas de reacción reales
No pinta elementos innecesarios y mantiene un diseño elegante y minimalista.
🚀 ¿Para quién está diseñado?
Ideal para traders que utilizan:
Smart Money Concepts
Wyckoff
Order Flow
ICT / SMC
Swing trading basado en estructura
Trading algorítmico basado en OB
Estrategias basadas en trampas y breakers
Notas de Lançamento
📌 Smart Swing & Order Block Pro v1The Smart Swing & Order Block Pro v1 indicator is an advanced tool designed for traders who use Smart Money Concepts, institutional analysis, and deep market-structure reading. It combines precise Order Block detection, intelligent classification, reliable swing identification, and professional volume/delta filtering to deliver a clean, structured, and actionable view of price behavior.
🎯 Indicator Purpose
Provide a consistent, clean, and verifiable identification of institutional zones (OBs), their evolution over time, their break and mitigation events, and a complete structural reading of swings and trend direction.
This indicator replaces the typical noise found in standard OB tools with a robust system based on:
- OBs validated by volume and delta
- Dynamic OB classification (Extreme, Mitigated, Breaker, Intermediate)
- Clean visual separation between intact and broken OBs
- Accurate Swing High / Swing Low detection using dynamic pivots
- Visual panels with quantitative swing and OB statistics
🧠 Key Features
1. Precision Order Block Detection
The indicator identifies bullish and bearish Order Blocks using a combination of:
- Market structure
- Validated breakouts
- Optional filtering via relative volume (RVOL)
- Normalized delta filtering to measure directional intent
This prevents low-quality or non-institutional OBs from being drawn.
2. Intelligent OB Classification
Each detected OB is automatically assigned a structural role:
🔹 Extreme OB
The origin point of a movement (up leg or down leg).
Crucial for spotting institutional footprints and major displacement zones.
🔹 Mitigated OB
An OB already tapped or partially consumed by price.
Useful for identifying weakened zones or controlled pullbacks.
🔹 Breaker OB
An OB broken by price in the opposite direction.
The box is visually split into two parts:
Left section → original OB color
Right section → breaker color
🔹 Intermediate OB
Active OBs that do not meet the criteria above.
3. Professional OB Visualization
- OBs automatically extend to the right.
- Broken OBs show a clear color split (intact vs. breaker).
- Mitigated OBs update color automatically.
- Extreme OBs are highlighted with a special color.
- Automatic cleanup of boxes and lines for performance and clarity.
4. Ultra-Precise Swing Detection
Unlike standard swing indicators:
- Uses configurable pivot strengths
- Marks the exact candle that created the swing
- Avoids excessive false signals
- Draws clean swing-high and swing-low lines
- Places crosses exactly when price breaks a swing
This results in a perfectly readable structure (HH, HL, LH, LL).
5. Dynamic Panels
The script includes two optional informational panels:
📊 Swing Panel
Displays:
- Average bars between swing highs
- Average bars between swing lows
- Current trend based on structure (UP / DOWN / RANGE)
📉 OB Panel
Displays counts of:
- Bullish Extreme
- Bullish Mitigated
- Bearish Extreme
- Bearish Mitigated
Perfect for evaluating institutional strength and directional bias.
⚙️ Configurable Options
- Swing strength (independent lookback for high/low)
- Use of candle body vs. wicks
- Volume/delta filter modes (Strict, Normal, Loose)
- Toggle visibility of OBs, swings, and panels
- Color themes per OB classification
- Panel positioning (Top Left / Top Right)
🎨 Clean and Professional Visualization
The indicator focuses on:
- Clarity
- Structural accuracy
- Immediate interpretability
- Institutional-grade behavior
- Real reaction zones
Nothing unnecessary, nothing noisy — just clean structure.
🚀 Who Is This Indicator For?
Ideal for traders using:
- Smart Money Concepts (SMC)
- ICT-style analysis
- Wyckoff methodology
- Order Flow
- Swing trading based on structure
- Algorithmic OB logic
- Strategies based on breakers, traps, and displacement
Notas de Lançamento
Professional OB Visualization- OBs automatically extend to the right.
- Broken OBs show a clear color split (intact vs. breaker).
- Mitigated OBs update color automatically.
- Extreme OBs are highlighted with a special color.
- Automatic cleanup of boxes and lines for performance and clarity.
Notas de Lançamento
Smart Swing & Order Block Pro v1 – What’s newUnified Swing & OB HUD panel
Added a single configurable HUD table that always stays on-screen. It shows:
• average bars between swing highs and swing lows
• current trend (UP / DOWN / RANGE)
• counts of Bull/Bear Extreme and Mitigated order blocks
• total Extreme % and a “Clean Session” flag.
Corner, background, text color and text size are fully user-configurable.
Volume & Delta quality filter
Implemented an RVOL + normalized delta filter with three modes (Strict / Normal / Loose).
This allows OB detection to be conditioned on real volume pressure instead of raw price only.
OB search safety & performance
Added an “Max bars scan per OB” setting and refactored the OB search so it never requests history beyond the available buffer.
This removes “historical offset is beyond buffer limit” errors, especially on lower timeframes, and makes the script more stable.
Cleaner OB classification & visuals
Order blocks are now consistently classified as Extreme / Intermediate / Mitigated / Breaker and drawn with dedicated colors and borders, improving readability of key zones.
Improved swing / leg structure logic
Swing-based leg detection (up-legs and down-legs) and the leg box are kept, but now work together with the HUD stats to give a clearer picture of market structure.
General refactor & minimalism
Grouped inputs (visibility, HUD, OB advanced, volume filter), extracted helper methods and avoided redundant calls to keep the code more scalable, readable and efficient while staying within Pine v5 limits.
Notas de Lançamento
This update improves the stability of the indicator when working with long historical datasets and lower timeframes. The indicator() declaration was extended with max_bars_back = 5000 (and max_boxes_count = 500) to give Pine enough historical buffer for all swing and order block calculations. This change eliminates the “requested historical offset is beyond the historical buffer’s limit” errors without modifying the core swing, volume/delta, or order block logic. All existing features (OB detection, swing statistics, and unified HUD table) remain unchanged in behavior, but the script now runs more reliably across different symbols and timeframes.Script protegido
Esse script é publicada como código fechado. No entanto, você pode gerenciar suas escolhas de bate-papo. Por favor, abra suas Configurações do perfil
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script protegido
Esse script é publicada como código fechado. No entanto, você pode gerenciar suas escolhas de bate-papo. Por favor, abra suas Configurações do perfil
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.