OPEN-SOURCE SCRIPT
已更新 Dynamic Supply and Demand Zones [Fer_inversiones]

=== ENGLISH DESCRIPTION ===
This indicator automatically identifies and plots dynamic Supply and Demand zones on the chart using ATR-based buffer heights and volume weighting to highlight institutional order block areas.
### How it Works:
1. Swing High / Swing Low Detection: Uses pivot highs and lows to identify potential liquidity turning points.
2. Volume Filter & Ratio Calculation: Evaluates buying vs. selling volume ratios on the pivot candle to scale the zone's width and strength.
3. ATR Dynamic Sizing: Calculates zone height based on Average True Range (ATR) multiplied by the volume intention percentage.
4. Mitigation & Retest Tracking: Tracks when price retests a zone. Once price breaks past the distal border, the zone is mitigated and removed.
5. On-Screen Price Table: Displays the closest active Supply and Demand levels right on the chart.
### UI Translation (User Interface Settings):
- "Precio a mostrar" (Price to display):
- Entrada (Proximal) = Entry / Proximal Price
- 50% (Equilibrium) = 50% Equilibrium Level
- Límite Opuesto (Distal) = Opposite / Distal Limit
- "Posición del Panel" (Table Position): Options for screen positioning (Top/Middle/Bottom - Left/Center/Right).
---
=== DESCRIPCIÓN EN ESPAÑOL ===
Este indicador identifica y dibuja automáticamente zonas dinámicas de Oferta (Supply) y Demanda (Demand) en el gráfico, utilizando rangos basados en ATR y ponderación de volumen para resaltar áreas de bloques de órdenes.
### Funcionalidades clave:
1. Detección de Pivotes (Swings): Identifica máximos y mínimos claves.
2. Filtro de Volumen: Calcula el porcentaje de intención compradora/vendedora.
3. Altura Dinámica por ATR: Ajusta el grosor de las zonas según la volatilidad y el volumen de la vela de origen.
4. Control de Re-tests: Cambia el color cuando las zonas son testeadas y las elimina cuando son invalidadas/mitigadas.
5. Tabla de Precios: Muestra en pantalla los niveles más cercanos de Supply y Demand en tiempo real.
This indicator automatically identifies and plots dynamic Supply and Demand zones on the chart using ATR-based buffer heights and volume weighting to highlight institutional order block areas.
### How it Works:
1. Swing High / Swing Low Detection: Uses pivot highs and lows to identify potential liquidity turning points.
2. Volume Filter & Ratio Calculation: Evaluates buying vs. selling volume ratios on the pivot candle to scale the zone's width and strength.
3. ATR Dynamic Sizing: Calculates zone height based on Average True Range (ATR) multiplied by the volume intention percentage.
4. Mitigation & Retest Tracking: Tracks when price retests a zone. Once price breaks past the distal border, the zone is mitigated and removed.
5. On-Screen Price Table: Displays the closest active Supply and Demand levels right on the chart.
### UI Translation (User Interface Settings):
- "Precio a mostrar" (Price to display):
- Entrada (Proximal) = Entry / Proximal Price
- 50% (Equilibrium) = 50% Equilibrium Level
- Límite Opuesto (Distal) = Opposite / Distal Limit
- "Posición del Panel" (Table Position): Options for screen positioning (Top/Middle/Bottom - Left/Center/Right).
---
=== DESCRIPCIÓN EN ESPAÑOL ===
Este indicador identifica y dibuja automáticamente zonas dinámicas de Oferta (Supply) y Demanda (Demand) en el gráfico, utilizando rangos basados en ATR y ponderación de volumen para resaltar áreas de bloques de órdenes.
### Funcionalidades clave:
1. Detección de Pivotes (Swings): Identifica máximos y mínimos claves.
2. Filtro de Volumen: Calcula el porcentaje de intención compradora/vendedora.
3. Altura Dinámica por ATR: Ajusta el grosor de las zonas según la volatilidad y el volumen de la vela de origen.
4. Control de Re-tests: Cambia el color cuando las zonas son testeadas y las elimina cuando son invalidadas/mitigadas.
5. Tabla de Precios: Muestra en pantalla los niveles más cercanos de Supply y Demand en tiempo real.
版本注释
🇺🇸 Description (English)📌 Dynamic Supply & Demand Zones with Pivot Levels & Alerts [Fer_inversiones]
This script is an advanced, dynamic technical analysis tool designed to automatically identify key Supply (Resistance) and Demand (Support) zones, as well as relevant Pivot High/Low levels, helping traders pinpoint potential market turning points with high precision.
🔑 Key Features & Improvements
1. Dynamic Supply & Demand Zones
ATR-Based Adaptive Height: Zone thickness dynamically scales using Average True Range (ATR) based on buying/selling pressure percentages.
Volume Filter: Filters out low-volume market noise by requiring pivot bars to exceed the 20-period volume moving average.
Tested & Mitigated Zones: Visually distinguishes fresh zones from tested ones and automatically removes fully mitigated levels to keep your chart clean.
2. Key Pivot Levels (New Feature!)
Pivot Highs & Lows: Automatically plots horizontal extension lines at key swing highs and lows.
Fully Customizable Visuals: Configure line style (Solid, Dotted, Dashed), width, and distinct colors for Highs and Lows.
History Control: Retains a user-defined number of key pivot levels to avoid cluttering.
3. Real-Time Price Dashboard
Displays a clean, customizable table with immediate proximal/distal levels for the nearest active Supply and Demand zones.
4. Integrated Dynamic Alerts (New Feature!)
Built-in native Pine Script alerts triggered when price enters active Supply/Demand zones or breaks key Pivot High/Low levels.
⚙️ How to Set Up Alerts
Apply the indicator to your chart.
Press Alt + A (or click the Alert icon) to create a new alert.
Select this indicator in the Condition dropdown.
Set the second dropdown to "Any alert() function call".
Choose "Once Per Bar" or "Once Per Bar Close" to avoid false triggers.
🇦🇷 Descripción (Español)
📌 Dynamic Supply & Demand Zones con Niveles de Pivote y Alertas [Fer_inversiones]
Este script es una herramienta avanzada de análisis técnico dinámico diseñada para identificar automáticamente zonas clave de Oferta (Resistencia) y Demanda (Soporte), así como niveles relevantes de Pivotes (Pivot High/Low), ayudando a los traders a detectar puntos de giro en el mercado con alta precisión.
🔑 Características Principales y Mejoras
1. Zonas Dinámicas de Oferta y Demanda
Grosor Adaptativo con ATR: La altura de las zonas se ajusta dinámicamente mediante el Rango Medio Verdadero (ATR) según el porcentaje de presión compradora o vendedora.
Filtro de Volumen: Filtra el ruido del mercado requiriendo que la vela de giro supere el promedio móvil de volumen de 20 períodos.
Zonas Testeadas y Mitigadas: Diferencia visualmente las zonas frescas de las testeadas y elimina automáticamente aquellas totalmente mitigadas para mantener el gráfico limpio.
2. Niveles Clave de Pivotes (¡Nueva Función!)
Pivot Highs & Lows: Traza automáticamente líneas horizontales extendidas en los máximos y mínimos de swing más relevantes.
Estilo Visual Personalizable: Configuración de estilo de línea (Sólida, Punteada, Trazo), grosor y colores independientes para techos y pisos.
Control Histórico: Mantiene una cantidad de pivotes configurables por el usuario para no saturar la pantalla.
3. Panel de Precios en Tiempo Real
Muestra una tabla clara con los precios proximales/distales más cercanos de las zonas activas.
4. Sistema de Alertas Dinámicas Integrado (¡Nueva Función!)
Alertas nativas que se disparan cuando el precio entra en una zona de Oferta/Demanda o cuando rompe un nivel de Pivote clave.
⚙️ Cómo Configurar las Alertas
Aplicá el indicador en tu gráfico.
Presioná Alt + A (o hacé clic en el ícono de Alertas) para crear una nueva alerta.
Seleccioná este indicador en el desplegable de Condición.
En el segundo desplegable elegí "Cualquier función de llamada de alert()".
Seleccioná "Una vez por barra" o "Una vez por cierre de barra" para evitar falsas alarmas.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。