TradingView
Alien_Algorithms
2 oct. 2023 04:02

Crypto Liquidation Heatmap 

Bitcoin / TetherUS PERPETUAL CONTRACTBinance

Description

This indicator is designed to identify potential areas of liquidations, in most crypto assets.


How does it work?
At the core of this indicator, it utilizes Open Interest (a statistic measuring the sum of all open futures positions), which I will refer to as OI.

The script monitors changes in OI, and then correlates these changes to the price action trend to derive an estimation of whether an increase in OI relates to an increase in Shorts or in Longs.

The trend is currently identified by the candle closing direction, therefore a bullish candle with increasing OI, results in the script counting an increase in Long Positions. Whereas a bearish candle and increasing OI, results in an increase of Short Positions.

Following that, the script estimates where these new positions will be liquidated (set either as a manual percentage, or using one of the defined presets).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What makes this indicator unique from "Liquidation Levels" scripts, is the the way it groups potential liquidation volumes in segments, creating a cumulative view of liquidity potential - a true heatmap, not simply levels. To further clarify, liquidity within a set range is added to the segment of that range. The settings allow you to set the resolution of the range, according to preference. There is also an Automatic mode (at this moment limited to Bitcoin).

Regular OI Liquidation levels do not combine their volumes when overlapped, nor do they adhere to any ranges - making them scattered and not representative of the true liquidity in that area. This Liquidation Heatmap fixes all of those limitations.

Another unique addition to this Liquidation Heatmap, is my custom three tier color gradients with alpha support (transparency). This function allows a seamless transition of the coloring in liquidation potential from purple (minimum), to blue (medium), to yellow (maximum). This allows a larger range of liquidity identification, along with further aesthetic bonuses.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How to use this indicator?
In general, such a tool can be used in numerous ways. It is not a standalone signal, meaning you should always compliment this tool with your own TA and reasoning.

One way of using this tool, is to anticipate that the price will continue on its trend, when you see it moving towards a zone of high liquidity (expecting that liquidity to be taken out).

Another way of using this tool, would be to anticipate a kickback after a liquidation event has taken place, thus returning to the mean.

Notes de version

Performance Update
- Fewer crash occurrences
- Refactored code for faster loading speeds

Notes de version

Increased granularity for certain altcoins (settings)

Notes de version

Active levels can now be extended into the future, for more intuitive visualization.
Commentaires
Bitbrainiacs
what is color code of the background? for clear chart it is better to have same background as the indicator
Alien_Algorithms
@Bitbrainiacs, Here you go :) #1A1425
Bitbrainiacs
@Alien_Algorithms, great! thanks
juliusmwiedemann
nice!!! I only have one question. i am not able to see some liquidation levels on a 15m chart compared to 30m or 1h. same thing for higher timeframes. is it out of range or how does the script work between different timeframes?
Alien_Algorithms
@juliusmwiedemann, If you wish to maintain the same levels across timeframes, you need to select it manually in the settings.

However in Automatic mode, higher timeframes target lower leverages. Conversely, lower timeframes target higher leverages.
aliadeel
This is absolutely AWESOME
ajconca
This is incredible. How do I see a legend to make sense of the different colors?
Alien_Algorithms
@ajconca, Brighter and more intense color means higher volumes.
ajconca
@Alien_Algorithms, thank you! This is wicked work.
Davinvestor
simply magnificent.
Plus