OPEN-SOURCE SCRIPT
[delta2win] Liquidity Zone Map

🔥 Liquidity Zone Map — Volume‑normalized pivot zones with adaptive ATR scaling
📊 What it does:
• Detects potential liquidity/liquidation zones above confirmed highs and below confirmed lows
• Draws dynamic zones whose height scales with ATR and whose color intensity scales with volume
• Zones extend right and terminate on rule‑based events (midline cross)
🔬 How it works (core formulas):
• Pivot detection: ta.pivothigh/ta.pivotlow with length L
• Zone height: H = max(ATR(T) × M, MinTicks)
• Intensity (volume‑normalized):
– Z‑Score mode: I = clamp((V − μ) / (σ + ε), 0..1)
– Piecewise mode: I = clamp(V ≤ μ ? V/μ : (V − μ) / (Vmax − μ + ε), 0..1)
• Gradient color: col = Gradient(I) (start → mid → end)
• Zone life‑cycle:
– Creation on new pivot (top/bottom)
– Right edge follows bar_index
– Termination when [low ≤ Mid ≤ high] with Mid = (Top+Bottom)/2, or optional TTL timeout
• Analysis range: global or constrained (Bars Back or ±% price window). Color scaling can be global or range‑scoped.
🆕 What’s new/different:
• Selectable volume normalization (Z‑Score or Piecewise)
• Timeframe‑adaptive ATR multiplier
• Range‑scoped vs. global color scaling
• Optional midlines, borders, info legend, scale legend
• Optional TTL termination for zones (lifetime in bars)
• Object management (cleanup/pooling) for performance
🧭 How to use (suggested presets):
• 1–5m: L=2, T=200, M=0.25, Range=Bars Back 1000, Intensity=Piecewise
• 15–60m: L=3, T=200, M=0.20, Range=Bars Back 1500, Intensity=Piecewise
• 4h+: L=4, T=200, M=0.20, Range=Off, Intensity=Z‑Score
⚙️ Settings:
• Pivot length L, ATR length T, multiplier M, MinTicks
• Opacity: base/auto (min/max)
• Range: Bars Back | Price Range ±% | Off
• Scaling: global vs. range‑scoped
• Midlines/borders/legends on/off
💡 Usage notes:
• Smaller L → more reactive, less robust
• Larger M → longer‑lasting zones
• On higher TFs, constrain "Bars Back" for performance
⚠️ Limitations:
• Non‑predictive; regime/volatility dependent
• Data quality impacts intensity computation
📊 What it does:
• Detects potential liquidity/liquidation zones above confirmed highs and below confirmed lows
• Draws dynamic zones whose height scales with ATR and whose color intensity scales with volume
• Zones extend right and terminate on rule‑based events (midline cross)
🔬 How it works (core formulas):
• Pivot detection: ta.pivothigh/ta.pivotlow with length L
• Zone height: H = max(ATR(T) × M, MinTicks)
• Intensity (volume‑normalized):
– Z‑Score mode: I = clamp((V − μ) / (σ + ε), 0..1)
– Piecewise mode: I = clamp(V ≤ μ ? V/μ : (V − μ) / (Vmax − μ + ε), 0..1)
• Gradient color: col = Gradient(I) (start → mid → end)
• Zone life‑cycle:
– Creation on new pivot (top/bottom)
– Right edge follows bar_index
– Termination when [low ≤ Mid ≤ high] with Mid = (Top+Bottom)/2, or optional TTL timeout
• Analysis range: global or constrained (Bars Back or ±% price window). Color scaling can be global or range‑scoped.
🆕 What’s new/different:
• Selectable volume normalization (Z‑Score or Piecewise)
• Timeframe‑adaptive ATR multiplier
• Range‑scoped vs. global color scaling
• Optional midlines, borders, info legend, scale legend
• Optional TTL termination for zones (lifetime in bars)
• Object management (cleanup/pooling) for performance
🧭 How to use (suggested presets):
• 1–5m: L=2, T=200, M=0.25, Range=Bars Back 1000, Intensity=Piecewise
• 15–60m: L=3, T=200, M=0.20, Range=Bars Back 1500, Intensity=Piecewise
• 4h+: L=4, T=200, M=0.20, Range=Off, Intensity=Z‑Score
⚙️ Settings:
• Pivot length L, ATR length T, multiplier M, MinTicks
• Opacity: base/auto (min/max)
• Range: Bars Back | Price Range ±% | Off
• Scaling: global vs. range‑scoped
• Midlines/borders/legends on/off
💡 Usage notes:
• Smaller L → more reactive, less robust
• Larger M → longer‑lasting zones
• On higher TFs, constrain "Bars Back" for performance
⚠️ Limitations:
• Non‑predictive; regime/volatility dependent
• Data quality impacts intensity computation
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
— delta2win —
Advanced Pine Script v6 Developer
Note: Not financial advice. Do your own research.
Topics:
• Pine Script v6
• Market structure, volatility, liquidity
• Non-repainting signals
My Community on TG: t.me/+5ZESlWVag19lMzU0
Advanced Pine Script v6 Developer
Note: Not financial advice. Do your own research.
Topics:
• Pine Script v6
• Market structure, volatility, liquidity
• Non-repainting signals
My Community on TG: t.me/+5ZESlWVag19lMzU0
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
— delta2win —
Advanced Pine Script v6 Developer
Note: Not financial advice. Do your own research.
Topics:
• Pine Script v6
• Market structure, volatility, liquidity
• Non-repainting signals
My Community on TG: t.me/+5ZESlWVag19lMzU0
Advanced Pine Script v6 Developer
Note: Not financial advice. Do your own research.
Topics:
• Pine Script v6
• Market structure, volatility, liquidity
• Non-repainting signals
My Community on TG: t.me/+5ZESlWVag19lMzU0
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.