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
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
— 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
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
— 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
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。