OPEN-SOURCE SCRIPT
R2D2 Liquidation Heatmap

R2D2 Liquidation Heatmap: The Professional’s Guide to Trapped Liquidity
Liquidity is the lifeblood of the crypto markets, and more often than not, someone’s forced exit is your ideal entry. In high-leverage environments, price doesn't just move linearly; it moves from one pocket of trapped traders to the next. The R2D2 Liquidation Heatmap is designed to pull back the curtain on these "invisible" price levels, mapping exactly where stop-losses cluster and where market stress is most likely to break.
________________________________________
The Core Philosophy: Trading the "Pain"
Most indicators look at where the price has been. This indicator looks at where the price wants to go to find fuel.
A liquidation cascade occurs when the market hits a dense cluster of stop-orders or liquidation prices. This triggers a self-reinforcing loop: forced sells lead to more price drops, which trigger more sells. By identifying these zones before they are hit, you shift from being a reactive trader to a predictive one.
Heatmap Components
• Current Liquidation Levels: These are "active" zones. They extend to the right of the current price because they represent future targets.
• Historical Liquidation Levels: These are "spent" zones. When a line stops and freezes at a specific bar, it shows you exactly where a flush occurred, giving you a map of how the market responded to that specific injection of volatility.
________________________________________
The Color Spectrum: Decoding Intensity
The heatmap uses a multi-stop gradient to show you the "mass" of the positions at any given level.
Color Meaning Expected Reaction
Dark Purple Low Liquidity Minor speed bump; price may slice through with little effort.
Blue / Indigo Medium Liquidity Potential area for a "pause" or a minor retracement.
Cyan / Light Blue High Liquidity Strong magnet for price; likely to see a spike in volume.
Bright Mint Green Extreme Liquidity High probability of a violent cascade or a major trend reversal.
________________________________________
Professional Trading Strategies
1. The "Liquidity Sweep" Entry
Professional traders rarely buy a support line the first time it’s touched. Instead, they look for the Bright Green cluster sitting just below that support. When price "sweeps" into that green zone and immediately bounces, it indicates that the trapped longs have been flushed out, leaving the path clear for an upside move.
2. Target-Based Exits
If you are in a long position and see a massive Cyan/Green cluster above the current price, that is your exit magnet. These zones act as "liquidity draws." Price is statistically drawn to these areas to facilitate large orders. Setting your Take Profit just inside these clusters ensures you get filled during the peak of the volatility.
3. Avoiding the "Gap"
If you see a large price gap between the current price and the next major liquidation cluster, expect a "slippage zone." Price tends to move very quickly through these low-liquidity areas (Dark Purple) because there are no orders to slow it down.
________________________________________
Scaling for Professionals: Timeframe Optimization
The biggest mistake traders make is using the same sensitivity on a 30m chart as they do on a Daily chart. To get a clean, professional-grade heatmap, you must adjust your Cluster Tolerance and Intensity Threshold.
Recommended Settings Table
Timeframe Pivot Length Cluster Tolerance Intensity Threshold
30m - 1HR 3 0.05% - 0.1% 3.0
4HR 3 - 5 0.3% - 0.5% 4.5
Daily 3 1.0% - 2.0% 6.0+
Why the change?
• Cluster Tolerance: On a Daily chart, a "level" is a wide zone. If you keep the tolerance at 0.05%, you will see hundreds of tiny, weak lines. Setting it to 1.5% on the Daily allows the script to aggregate all the stops within a $1,200 range (on BTC), showing you the true macro "wall" of liquidity.
• Intensity Threshold: Daily volume is massive compared to the average. Pushing the intensity to 6.0 or higher ensures that only the most extreme, market-shifting events light up in green, keeping your chart clean and actionable.
________________________________________
Final Tips for Success
• Trust the "Untouched": Significant liquidation levels that haven't been hit for months are often the ultimate "Magnets" for a macro trend.
• Watch the Clusters: If you see three or four lines merging into one thick, bright green bar, pay attention. That is a high-conviction zone where thousands of traders have their "line in the sand."
• Scaling Matters: Always ensure your indicator is pinned to the Right Scale. If the lines don't move when you drag the chart, right-click the indicator name and select "Pin to Scale."
May the trades be with you.
Liquidity is the lifeblood of the crypto markets, and more often than not, someone’s forced exit is your ideal entry. In high-leverage environments, price doesn't just move linearly; it moves from one pocket of trapped traders to the next. The R2D2 Liquidation Heatmap is designed to pull back the curtain on these "invisible" price levels, mapping exactly where stop-losses cluster and where market stress is most likely to break.
________________________________________
The Core Philosophy: Trading the "Pain"
Most indicators look at where the price has been. This indicator looks at where the price wants to go to find fuel.
A liquidation cascade occurs when the market hits a dense cluster of stop-orders or liquidation prices. This triggers a self-reinforcing loop: forced sells lead to more price drops, which trigger more sells. By identifying these zones before they are hit, you shift from being a reactive trader to a predictive one.
Heatmap Components
• Current Liquidation Levels: These are "active" zones. They extend to the right of the current price because they represent future targets.
• Historical Liquidation Levels: These are "spent" zones. When a line stops and freezes at a specific bar, it shows you exactly where a flush occurred, giving you a map of how the market responded to that specific injection of volatility.
________________________________________
The Color Spectrum: Decoding Intensity
The heatmap uses a multi-stop gradient to show you the "mass" of the positions at any given level.
Color Meaning Expected Reaction
Dark Purple Low Liquidity Minor speed bump; price may slice through with little effort.
Blue / Indigo Medium Liquidity Potential area for a "pause" or a minor retracement.
Cyan / Light Blue High Liquidity Strong magnet for price; likely to see a spike in volume.
Bright Mint Green Extreme Liquidity High probability of a violent cascade or a major trend reversal.
________________________________________
Professional Trading Strategies
1. The "Liquidity Sweep" Entry
Professional traders rarely buy a support line the first time it’s touched. Instead, they look for the Bright Green cluster sitting just below that support. When price "sweeps" into that green zone and immediately bounces, it indicates that the trapped longs have been flushed out, leaving the path clear for an upside move.
2. Target-Based Exits
If you are in a long position and see a massive Cyan/Green cluster above the current price, that is your exit magnet. These zones act as "liquidity draws." Price is statistically drawn to these areas to facilitate large orders. Setting your Take Profit just inside these clusters ensures you get filled during the peak of the volatility.
3. Avoiding the "Gap"
If you see a large price gap between the current price and the next major liquidation cluster, expect a "slippage zone." Price tends to move very quickly through these low-liquidity areas (Dark Purple) because there are no orders to slow it down.
________________________________________
Scaling for Professionals: Timeframe Optimization
The biggest mistake traders make is using the same sensitivity on a 30m chart as they do on a Daily chart. To get a clean, professional-grade heatmap, you must adjust your Cluster Tolerance and Intensity Threshold.
Recommended Settings Table
Timeframe Pivot Length Cluster Tolerance Intensity Threshold
30m - 1HR 3 0.05% - 0.1% 3.0
4HR 3 - 5 0.3% - 0.5% 4.5
Daily 3 1.0% - 2.0% 6.0+
Why the change?
• Cluster Tolerance: On a Daily chart, a "level" is a wide zone. If you keep the tolerance at 0.05%, you will see hundreds of tiny, weak lines. Setting it to 1.5% on the Daily allows the script to aggregate all the stops within a $1,200 range (on BTC), showing you the true macro "wall" of liquidity.
• Intensity Threshold: Daily volume is massive compared to the average. Pushing the intensity to 6.0 or higher ensures that only the most extreme, market-shifting events light up in green, keeping your chart clean and actionable.
________________________________________
Final Tips for Success
• Trust the "Untouched": Significant liquidation levels that haven't been hit for months are often the ultimate "Magnets" for a macro trend.
• Watch the Clusters: If you see three or four lines merging into one thick, bright green bar, pay attention. That is a high-conviction zone where thousands of traders have their "line in the sand."
• Scaling Matters: Always ensure your indicator is pinned to the Right Scale. If the lines don't move when you drag the chart, right-click the indicator name and select "Pin to Scale."
May the trades be with you.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。