Introduction

In this instructional article, I will be discussing my new indicator called Liquidation Levels. For the past year, I have been intensively incorporating derivatives data analysis, order flow, volume and other related concepts into my trading system in order to gain a deeper understanding of market activity beyond simply analyzing price action. This and my recent (bear market) efforts to learn Pine Script inspired me to build an indicator that incorporates some lately very popular concepts such as liquidations and liquidity. I have been using Hyblock's Liquidation Levels tool for quite some time and decided to challenge myself to build a similar tool on Tradingview based on my own understanding of these concepts (their tool is not open script) and with some of my own modifications and additions. I was aware that it would not be an easy task due to the limited data available in Pine Script, but I gave it a try and was able to create a fairly useful indicator. I guess Hyblock’s tool is still more accurate, especially because they have access to more data but I believe I did a solid job with the resources I had and added some new concepts that are considered useful by myself and early testers of the indicator. If you want to test Hyblock’s platform, you can use my referral link to get 10% discount - hyblockcapital.com/referer/NW9XLL

The job of this indicator is to attempt to predict the liquidation levels of other traders and use this information to add an edge to our own trading decisions. It is not the aim of this article to explain why or how this happens but for one reason or another, price gravitates toward those levels. It is known that the majority of traders are not profitable, particularly when using high leverage. This fact is crucial in understanding the potential usefulness of liquidation levels for our own trading, because if we know that most of the over-leveraged traders will get flushed out, we can play against them. As you probably know, there is no way to see actual liquidation levels or stop loss prices of other traders unless you are an exchange or among a few other entities who have access to such data. As a result, all available liquidation level tools are simply predictions based on various types of data. My script uses open interest (where available), volume, price movements, and a set of “educated guesses” to calculate the potential levels at which over-leveraged traders may be liquidated. Additionally, I have included functionalities beyond simply displaying liquidation lines in order to better visualize and interpret market activity.

As a user of various tools, I have always appreciated when the creators provide the ability to customize the tools to meet my specific needs. That is why this indicator's settings offer a great deal of flexibility when it comes to modifying parameters, conditions, inputs, and other elements, enabling you to tailor it to fit your system. While it may seem confusing at first, I am confident that this instructional article will help you comprehend and utilize the indicator to its full potential.

Finally, I want to stress that I am not a coder, I’m simply a trader who has been learning and playing around with Pine Script. Therefore, I ask for your patience regarding any potential mistakes or the functioning of this script in general. As my skills improve and we all conduct more thorough testing, the indicator will be modified and enhanced. If you have any questions, feel free to message me on Twitter or send a message to my Telegram/Discord community. The links to both are listed on my Linktree: linktr.ee/leviathancrypto

If you want to support my work, you can consider registering on my partner exchanges Bybit and/or BingX, where I will recieve a small percentage of your trading fees (that would otherwise be paid only to the exchange) and you will get fee deductions, deposit bonuses, trading bonuses, access to trading competitions and more. Bybit: https://partner.bybit.com/b/Leviathan BingX: https://bingx.com/partner/Leviathan

Indicator Settings

It is very important to understand all the settings offered by my indicator before using it, so I will go over them one by one and do my best to explain the concepts. I highly recommend thoroughly reading this article and then experimenting with the script to determine your preferred inputs. The settings consist of Basic Settings, Appearance, Standard Deviation Multipliers and Other Settings.

Primary source of data

Untitled

As I mentioned, I wanted to provide a great deal of flexibility in the indicator settings. This input allows you to choose the primary source of data that the script uses to calculate liquidation levels. I encourage you to test them all and see which works best for the assets and timeframes you trade. You can also regularly switch between to see confluences. My personal favorite inputs (and also most accurate ones) are Open Interest, Open Interest + Volume (OI+VOL), and Open Interest + CVD (OI+CVD), as they utilize Open Interest in the calculations, which is the most important factor when it comes to analyzing position opening/closing and market activity in general. The other options that do not include Open Interest (Volume, CVD) were mainly added to provide the possibility to use the indicator on pairs where OI data is not available. Please note that this indicator is built on Tradingview and can only use data (e.g., Open Interest) provided by Tradingview, which is unfortunately quite limited. This is why I recommend using the script with OI-based data source inputs on Binance's perpetual futures pairs, as this is where OI data is available. The volume-based data source inputs can be used on spot pairs, forex, indices, and other markets, where Open Interest data is not provided.

To summarize the use of Primary source of data:

  1. Open Interest - use on Binance’s perpetual futures or anywhere else where OI data is available
  2. OI + VOL - use on Binance’s perpetual futures or anywhere else where OI data is available
  3. OI + CVD - use on Binance’s perpetual futures or anywhere else where OI data is available
  4. CVD - use on any pair you wish
  5. Volume - use on any pair you wish

Directional bias

If turned on, the Directional bias function uses volume and some other calculations to predict which side’s liquidation levels are more likely to be filled and only keep those levels on your chart.

Screenshot 2022-12-20 at 14.19.18.png

Directional Bias for Liquidation Levels Turned ON: only one side’s liquidation levels are shown on the chart Turned OFF: all liquidation levels are shown on the chart

Directional Bias for Liquidation Bubbles Turned ON: only one side’s liquidation level bubbles are shown on the chart Turned OFF: all liquidation bubbles are shown on the chart

I have separated directional bias options between Liquidation Levels and Liquidation Level Bubbles because sometimes it can be useful to have one of them ON and the other one OFF.

Reduce sensitivity

The Reduce Sensitivity option allows you to multiply the thresholds for "Smaller Size Liquidation," "Medium Size Liquidation," and "Large Size Liquidation" simultaneously. This is a useful feature as it enables you to easily filter larger positions and their liquidations without having to manually alter the standard deviation multipliers, which will be discussed in further detail later in the article.

Screenshot 2022-12-20 at 14.21.07.png

The default value is 1, which means that it does nothing.

Increasing it above 1 will increase all thresholds and therefore generate fewer liquidation levels but with larger relative sizes.