TradingView
tartigradia
30 ноя 2022 г., 01:50

Liquidations by volume (TG fork) 

Bitcoin all time history indexINDEX

Описание

Shows actual liquidations on a per-candle basis by using the difference in volume between spot and futures markets.
i.e. volume on a futures market will be much higher if there are many liquidations.

By default, green represents short liquidations (hence a bullish move, hence why it's green), whereas red is for long liquidations (bearish move). The colors can be changed in the settings if you prefer an inverted theme.

Long liquidation data should in theory be more accurate than short liquidation data due to the inability to short on a spot market.
This indicator should be able to help identify trends by determining liquidation points in the chart.

Extended by Tartigradia to automatically detect the symbol (only for crypto assets found on Binance with a USDTPERP pair, so it works for ETH, BNB, etc) and add multi-timeframe support (MTF).

If you like the indicator, please show the original author Thomas_Davison some love:
tradingview.com/script/EjxQftfJ-Liquidations-by-volume-spot-futures/

Информация о релизе

Updates:
* Now support tickers with symbols that are longer than 3 characters (eg, SAND, etc.) by autodetecting where "USD" is located in the string. In exchange for this improvement, tickers that do not include "USD" in their string won't allow to display volumes (eg, ETHBTC), but anyway this was a mistake (because it did not represent the volumes of the non-USD ticker). Thanks to hamiissah for the suggestion and sharing some source code (that ended up not being used but the idea was recycled!).
* Reorder input parameters in neat groups.
* Clarify some input parameters purposes (titles, tooltips).
* Add option to always use Binance exchange as the data source, to avoid the risk that the exchange gets silently swapped in the background.

Информация о релизе

* Ticker autodetection now also works on composite tickers (eg, BINANCE:BTCUSD+KRAKEN:BTCUSD)/2 ). The first symbol will be extracted and used, so if the composite ticker is not a simple average of the same symbol across multiple exchanges, obviously the liquidations will be wrong, but anyway there is no source of data for liquidations over composite tickers by definition. To do that, a regular expression pattern matching was implemented to cleanup the input tickerid.

Информация о релизе

Changes:
* Improve visibility and scaling by converting the label into a table, which does not impact viewport scaling (ie, content is now shown bigger).
* Add tooltips for some options.
* Always show spot and futures volumes in the status bar, even if their visualizations as lines are disabled.

Информация о релизе

* Add clarifications of instructions and limitations:

This indicator can approximate the amount of liquidations (ie, bars where there were a lot more liquidations than others) from the difference between futures and spot, but it cannot distinguish the proportion of shorts versus longs liquidations, it is instead approximated with the current price bar's color, which naturally suggests where the majority of liquidations happened (ie, if a price bar closes above open and hence in green, then we can suppose that a majority of liquiditations were on shorts, since we know longs won). This explains why there is only one liquidation bar but colored, and not two, since we cannot separate longs or shorts liquidations.
Комментарии
Mass1q
How about entry and exit points? Liquidations can happen at the end of a move and can be interpreted as a false signal, intetested in your point of view
tartigradia
@Mass1q, That is a great question. You may have noted that generally I write a "How to use" section which describes how to read the indicator for entries/exits signals on almost all indicators I publish, but not this one. This is because not all indicators can be used for entry and exit points, some are only meant for retrospective analysis, to understand what happened in the markets in hindsight (aposteriori), and I think this is the case with this indicator. It is awesome to check when price movements were supported by liquidations, which is usually a sign that it can be sustained, that we are moving into another range during a bear market or continuing to move up in a bull market.

This works especially well in 30min up to 1h timeframes, where big liquidations usually coincide with big price candles, so that a lot of liquidations usually mean price moved substantially in these timeframes.

On the daily and weekly timeframes, it's a little more muddy, as is often the case when we try to use volume based indicators on higher timeframes: there, big liquidations bars do not necessarily coincide with big price candles, in fact often the biggest daily/weekly liquidation candles coincide with doji price candles (ie, close near open price, with long high and/or low wicks), which is a lot more difficult to understand, but generally means that open interests reached their highest point, with a lot of traders trying to bank on volatility on both sides, and most losing on both sides, so this may be an inflexion point.

I will give an example for the use of liquidations on the weekly timeframe, as it is much less intuitive than the 30min-1h timeframes. If we look at 2020-2022 BTCUSD bullrun on the daily timeframe, we can see that the two biggest liquidations bars were red liquidations bars (ie, short sellers won), and they both preceded a rebound, and hence the abnormal magnitude of both liquidation bars were signalling an overreaction of the markets, so you could try to enter a long swing trade.

Note however that price continued to slowly go down a bit more for a few more days before a real rebound happened.

Furthermore, note that you could only see this info aposteriori, after the weekly candles closed, you can use the bar replay function to partially simulate how the candles form (but not fully, read the tradingview manual, bar replay and strategies engine make a LOT of assumption), you will see that before the close, the liquidations can be a LOT different. The same is applicable to the 30min-1h timeframes, at close the liquidations can be a lot different than during open.

So all in all, it's a great indicator to understand what happened aposteriori, if liquidations helped push the price change further, or on the contrary cushioned a dump/pump to end up in a doji price candle, but I would not risk using it for entry/exit points, but you can use it to confirm other entry/exit indicators.
Mass1q
@tartigradia, thank you very much for sharing, I appreciated in particular the insight about the weekly candle, I think it's going to be very useful to interpreter the trend. I followed a bit the creator of the original script criteria and I found out big liquidation candles are often at the end or at the beginning of a daily cycle. If you can control time it's quite easy to find entry and exit point, for example if you use 45 min tf you'll find out a BTC cycle is formed by a minimum of 24 to a max 43 candles. When time is running out (32 candles usually) the last candle is a reversed hammer that squeezes a lot of short positions. So basically for me a clear reversal point that can be used to exit long or enter a short position
tartigradia
@Mass1q, very interesting! Thank you very much for sharing your insights as well, very interesting approach!
Ещё