OPEN-SOURCE SCRIPT
TraxisLab - Liquidation Heatmap

TraxisLab Liquidation Heatmap is a visual liquidity-mapping tool designed to estimate potential liquidation zones based on recent pivot highs/lows, leverage levels, volume, volatility, and clustered price areas.
The script projects possible long and short liquidation levels on the chart and groups nearby zones into readable clusters. It is built to help traders identify where leveraged positions may be vulnerable and where price could be drawn toward liquidity.
Core Concept
The indicator estimates liquidation zones by using pivot-based entry assumptions and configurable leverage levels.
When a pivot high or pivot low is detected, the script calculates potential liquidation prices for selected leverage tiers such as:
10x
25x
50x
100x
These levels are then displayed as heatmap zones and grouped into clusters when several liquidation levels are close to each other.
Anchor Symbol Support
The script can use an external anchor symbol as its data source.
For example, traders can display liquidation estimates on one chart while calculating zones from a selected futures symbol such as BTCUSDT perpetual contracts.
The anchor timeframe can also be customized, or left empty to use the current chart timeframe.
This is useful when you want liquidation zones to be based on a more liquid reference market.
Liquidation Zone Logic
The script estimates liquidation levels using:
Recent pivot highs and lows
Configurable leverage tiers
ATR-based volatility buffer
Maintenance margin assumptions
Fee buffer
Position-size approximation
Volume-based notional estimate
Long liquidation zones are projected below potential long entry areas.
Short liquidation zones are projected above potential short entry areas.
The result is a visual map of areas where leveraged positions may be forced out if price reaches those zones.
Heatmap Visualization
Liquidation zones are drawn as boxes on the chart.
The visual intensity depends on leverage, age, and density.
Older zones can fade over time, while higher-density zones receive stronger visual emphasis.
The heatmap includes:
Warm colors for long liquidation zones
Cool colors for short liquidation zones
Highlighting for high-density clusters
Special emphasis for the nearest zone
Optional cluster lines
Optional age fading
Visual prioritization to reduce noise
Cluster Detection
Nearby liquidation levels are automatically grouped into clusters using an ATR-based cluster radius.
Each cluster shows:
Number of zones in the cluster
Long vs short zone composition
Estimated notional volume
Distance from current price
Relevance score
Source information when using an anchor symbol
This helps traders focus on important liquidity areas instead of reading every individual liquidation box.
Nearest Zone Marker
The indicator can automatically highlight the closest liquidation cluster to the current price.
This marker shows:
Direction of the nearest zone
Percentage distance from price
Estimated volume in the cluster
This provides a quick overview of the next potential liquidity magnet above or below the market.
Liquidity Cockpit Table
The built-in table summarizes the most relevant nearby liquidation areas.
It displays:
Nearest short liquidation cluster above price
Nearest long liquidation cluster below price
Distance to each zone
Estimated volume
Number of active zones
Number of active clusters
Total estimated liquidation volume
Data source status
This makes it easier to read the heatmap without overcrowding the chart.
Alerts
The script includes alert conditions for:
Price near a long liquidation cluster
Price near a short liquidation cluster
Alerts trigger when price approaches a cluster with sufficient density within the defined ATR distance.
How to Use
Use this indicator as a liquidity and risk map, not as a direct entry signal.
Typical use cases include:
Identifying potential liquidity magnets
Spotting areas where leveraged traders may be forced out
Comparing nearby long and short liquidation pressure
Finding high-density liquidity clusters
Watching whether price is approaching the nearest liquidation zone
Using liquidation zones together with market structure, VWAP, trend, or order-flow tools
The strongest zones are usually those with multiple clustered levels, higher estimated volume, and proximity to current price.
Notes
This script does not access exchange liquidation books directly.
It creates an estimated liquidation heatmap based on price structure, volume, leverage assumptions, volatility, and configurable margin logic.
Values shown in millions are approximate and should be treated as visual context, not exact liquidation data.
The quality of the output depends on the selected symbol, anchor symbol, timeframe, and market conditions.
Disclaimer
This indicator is for educational and analytical purposes only.
It does not provide financial advice, trading recommendations, or guaranteed results. Always use proper risk management and perform your own analysis before making trading decisions.
The script projects possible long and short liquidation levels on the chart and groups nearby zones into readable clusters. It is built to help traders identify where leveraged positions may be vulnerable and where price could be drawn toward liquidity.
Core Concept
The indicator estimates liquidation zones by using pivot-based entry assumptions and configurable leverage levels.
When a pivot high or pivot low is detected, the script calculates potential liquidation prices for selected leverage tiers such as:
10x
25x
50x
100x
These levels are then displayed as heatmap zones and grouped into clusters when several liquidation levels are close to each other.
Anchor Symbol Support
The script can use an external anchor symbol as its data source.
For example, traders can display liquidation estimates on one chart while calculating zones from a selected futures symbol such as BTCUSDT perpetual contracts.
The anchor timeframe can also be customized, or left empty to use the current chart timeframe.
This is useful when you want liquidation zones to be based on a more liquid reference market.
Liquidation Zone Logic
The script estimates liquidation levels using:
Recent pivot highs and lows
Configurable leverage tiers
ATR-based volatility buffer
Maintenance margin assumptions
Fee buffer
Position-size approximation
Volume-based notional estimate
Long liquidation zones are projected below potential long entry areas.
Short liquidation zones are projected above potential short entry areas.
The result is a visual map of areas where leveraged positions may be forced out if price reaches those zones.
Heatmap Visualization
Liquidation zones are drawn as boxes on the chart.
The visual intensity depends on leverage, age, and density.
Older zones can fade over time, while higher-density zones receive stronger visual emphasis.
The heatmap includes:
Warm colors for long liquidation zones
Cool colors for short liquidation zones
Highlighting for high-density clusters
Special emphasis for the nearest zone
Optional cluster lines
Optional age fading
Visual prioritization to reduce noise
Cluster Detection
Nearby liquidation levels are automatically grouped into clusters using an ATR-based cluster radius.
Each cluster shows:
Number of zones in the cluster
Long vs short zone composition
Estimated notional volume
Distance from current price
Relevance score
Source information when using an anchor symbol
This helps traders focus on important liquidity areas instead of reading every individual liquidation box.
Nearest Zone Marker
The indicator can automatically highlight the closest liquidation cluster to the current price.
This marker shows:
Direction of the nearest zone
Percentage distance from price
Estimated volume in the cluster
This provides a quick overview of the next potential liquidity magnet above or below the market.
Liquidity Cockpit Table
The built-in table summarizes the most relevant nearby liquidation areas.
It displays:
Nearest short liquidation cluster above price
Nearest long liquidation cluster below price
Distance to each zone
Estimated volume
Number of active zones
Number of active clusters
Total estimated liquidation volume
Data source status
This makes it easier to read the heatmap without overcrowding the chart.
Alerts
The script includes alert conditions for:
Price near a long liquidation cluster
Price near a short liquidation cluster
Alerts trigger when price approaches a cluster with sufficient density within the defined ATR distance.
How to Use
Use this indicator as a liquidity and risk map, not as a direct entry signal.
Typical use cases include:
Identifying potential liquidity magnets
Spotting areas where leveraged traders may be forced out
Comparing nearby long and short liquidation pressure
Finding high-density liquidity clusters
Watching whether price is approaching the nearest liquidation zone
Using liquidation zones together with market structure, VWAP, trend, or order-flow tools
The strongest zones are usually those with multiple clustered levels, higher estimated volume, and proximity to current price.
Notes
This script does not access exchange liquidation books directly.
It creates an estimated liquidation heatmap based on price structure, volume, leverage assumptions, volatility, and configurable margin logic.
Values shown in millions are approximate and should be treated as visual context, not exact liquidation data.
The quality of the output depends on the selected symbol, anchor symbol, timeframe, and market conditions.
Disclaimer
This indicator is for educational and analytical purposes only.
It does not provide financial advice, trading recommendations, or guaranteed results. Always use proper risk management and perform your own analysis before making trading decisions.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน