PROTECTED SOURCE SCRIPT

Liquidation Levels - By Leviathan

ที่อัปเดต:
This indicator generates liquidation levels of over-leveraged traders and utilizes a variety of different tools to analyze data such as Open Interest and Volume to provide an edge in your trading system and help you with valuable market insights.

The concept of this indicator is inspired by the platform Hyblock and their Liquidation Levels tool.

The script offers a lot of flexibility in settings, so please read these instructions and test out different parameters to see what works best for you. Here is a short overview of all inputs, one by one.

PRIMARY SOURCE OF DATA
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 input:

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.

- 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 Level Bubbles
Turned ON: only one side’s liquidation level bubbles are shown on the chart
Turned OFF: all liquidation level bubbles are shown on the chart

I've 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.
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.
Decreasing it below 1 will lower all thresholds and therefore generate more liquidation levels but with both smaller and larger relative sizes.

BASE
This input gives you the possibility to choose between four different bases, from which the liquidation levels will be generated.
CLOSE ⇒ Levels are plotted above and below the close of the candle
HALF ⇒ Levels are plotted above and below the middle of the candle ((high+low)/2)
VWAP ⇒ Levels are plotted above and below the volume-weighted average price
VWMA ⇒ Levels are plotted above and below the volume-weighted moving average
I suggest that you backtest them and see what works best for you.

LIQUIDATION LEVEL BUBBLES
If enabled, "Liquidation Level Bubbles" mark the beginning of a new liquidation level and indicate the relative size of liquidations that would occur if the price were to reach that level.
Liquidation Bubbles or Liquidation Levels in general appear when there is a large influx of new positions and logically, (significant) new positions lead to (significant) new liquidation levels. Liquidation Bubbles can be used to estimate the size and therefore significance of a given liquidation level. It could be argued that the price is more likely to be attracted to larger Liquidation Level Bubbles. While this is often true, it is not always the case as the strong momentum created by large positions can sustain for a prolonged period before reversing and filling the remaining levels Similarly to other features in this indicator, significant new positions are identified and filtered using standard deviation thresholds and their multipliers. New positions are considered significant when newly opened positions exceed the threshold for "Smaller Size Liquidation," leading to the creation of new liquidation levels and bubbles.

1. If new positions exceed the first standard deviation multiplier ("Smaller Size Liquidation Level"), but do not exceed “Medium Size Liquidation Level”, a smaller-sized bubble appears.
2. If new positions exceed the second standard deviation multiplier (”Medium Size Liquidation Level”), but do not exceed “Large Size Liquidation Level”, a medium-sized bubble appears.
3. If new positions surpass the third standard deviation multiplier (”Large Size Liquidation Level”), a large-sized bubble appears.

Significant opened positions are identified and filtered by size using three "thresholds" in the form of standard deviations, which can be modified in the indicator settings, in the section called "Standard Deviation Multipliers".

**Increasing** the standard deviation multipliers of Liquidation Level Bubbles effectively increases the threshold for a given bubble to occur, making the conditions for its appearance stricter.
⇒ Fewer Liquidation Levels - just larger positions are included
**Decreasing** the standard deviation multipliers of Liquidation Level Bubbles effectively decreases the threshold for a given bubble to occur, making the conditions for its appearance looser.
⇒ More Liquidation Levels - smaller positions are included

Keep in mind that this should always be the case:
*Smaller Size Liquidation Level < Medium Size Liquidation Level < Large Size Liquidation Level*

MARKET ORDER BUBBLES
"Market Order Bubbles" is my experimental concept used as a way to analyze large volumes and visualize the market activity at significant levels under certain conditions. It is based on my imitation of CVD which is also used in other parts of the script. The aim of this concept is to give you an idea about the real-time heavy market buying and selling, which could indicate eg. large liquidations, large entries/exits. in order to add confluence to your analysis. Please note that this concept is still in its early stages and may be confusing as it might have been poorly implemented. I recommend taking the time to thoroughly read through this section in order to fully understand it. On the other hand, early backtesting results appear very promising, as the win rate of countertrading buy and sell bubbles under certain conditions was fairly high (70%). I will continue working on this tool, so stay tuned for future updates.

**Market Buy Order Bubbles** appear above the price and possibly signal the following:

- Short positions being liquidated (exit short = buy order)
- New traders entering late longs based on FOMO (enter long = buy order)
- New short positions (sells) of “smarter” traders absorbing liquidated/closed shorts (buys)
⇒ Possible reversal to the downside - look for the liquidation levels of longs to get filled

**Market Sell Order Bubbles** appear below the price and possibly signal the following:

- Long positions being liquidated (exit long = sell order)
- New traders entering late shorts based on FOMO (enter short = sell order)
- New long positions (buys) of “smarter” traders absorbing liquidated/closed longs (sells)
⇒ Possible reversal to the upside - look for the liquidation levels of shorts to get filled

significant volumes are identified and filtered using three “thresholds” in the form of standard deviations, which can be modified in indicator settings.

1. If buy/sell volume surpasses the first standard deviation (”**Smaller Size Market Orders**”), then the **smaller-sized bubble** appears.
2. If buy/sell volume surpasses the second standard deviation (”**Medium Size Market Orders**”), then the **medium-sized bubble** appears.
3. If buy/sell volume surpasses the third standard deviation (”**Large Size Market Orders**”), then the **large-sized bubble** appears.

**Increasing** the standard deviation multipliers effectively increases the threshold for a given bubble to appear, making the conditions for its occurrence more strict.

**Decreasing** the standard deviation multipliers effectively decreases the threshold for a given bubble to appear, making the conditions for its occurrence more strict.

Keep in mind that this should always be the case:
*Smaller Size Market Orders < Medium Size Market Orders < Large Size Market Orders*

COLOR CANDLES
The Color Candles function is a useful and interesting feature that will enhance your analysis with additional context. If enabled, the indicator will color the chart's candles based on different data. Currently, there are three options to choose from, with more to be added in future updates.

Color Candles: OI DELTA
This option will color the candles to reflect Open Interest Delta. If there is a net increase in open positions (positive Open Interest Delta), the candle will be colored green. If there is a net decrease in open positions (negative Open Interest Delta), the candle will be colored red. It is important to note that this option only functions on pairs for which Tradingview provides OI data
Color Candles: VOLUME
This option utilizes volume data to help you identify the trend and momentum, coloring the candles accordingly - upward impulses are colored green and downward impulses are colored red. This makes it easier to recognize trend reversals and adjust your directional bias accordingly.
Color Candles: STOCH
This option uses the Stochastic Oscillator and SMA to color the candles, helping you identify momentum as upward green moves transition to downward red moves and vice versa.

LEVERAGE RATIO
Leverage ratio is another experimental concept I have added to this script. If turned on, it provides a broad insight into whether the market is relatively over-leveraged or if the leverage is relatively low. The aim is to use it as a confluence in anticipating incoming volatility and possibly use it to understand other aspects of market activity. It is still in its early stages of development and needless to say, it only works on pairs where Open Interest data is provided by Tradingview.

Crosses above price = Leverage is relatively high
Crosses below price = Leverage is relatively low

MARKET INFO SCREENER, LEVEL LEGEND, HIDE FILLED LINES
The last three inputs of Basic Settings section:
”The Market Info Screener” feature will display a small panel on the right side of your chart that provides useful data about the market, including Open Interest, Volume, the aggressive side of traders, and the Leverage Ratio. More data coming in future updates.
"Level Legend" option will display a small legend on the right side of the chart, helping you or others viewing the chart to understand what the objects on the chart mean.
"Hide Filled Lines" option will hide liquidation levels that have already been filled, only displaying the active ones in order to reduce clutter on your chart.

APPEARANCE
The “Appearance” settings offer a variety of modifications for colors, styles, and visibility.
The "Line Style" input allows you to choose the style and width of the liquidation level lines. You can also select which levels to display, as well as the color of the liquidation level lines and bubbles. The "Max Number of Lines" input allows you to specify the number of level lines you want on a chart. If you feel that there is too much clutter, you can decrease this number, and old lines will be removed. Please note that Tradingview has a built-in limit of 500 lines on a given chart, so this value cannot be set above 500. The "Market Buy/Sell Bubble Style" input can be used to modify the color and style of the market order bubbles. Enabling the "Show Settings Screener" option will display a screener with a list of all your settings on the right side of the chart, making it easier to share your preferred settings with others."

STANDARD DEVIATION MULTIPLIERS
This is where you can set the standard deviation thresholds for Liquidation Levels and Market Order Bubbles. These values can be customized to your preference, as the default values may not be suitable for your needs or you may want to experiment with different values to see more or fewer liquidation levels or market order bubbles on your chart. Personally, I sometimes use this feature to increase the Large Size Market Orders or Large Size Liquidation Levels multipliers so that large-sized bubbles are only assigned to extremely large positions or volumes.

If you want to only analyze larger positions or volumes, you can increase the "Smaller Size" multipliers, which act as a minimum threshold.
If you also want to include even smaller positions or volumes in your analysis, you can decrease the values of the "Smaller Size" multipliers, which act as a minimum threshold

Please note that the "Reduce Sensitivity" option in Basic Settings affects the standard deviation multipliers of the liquidation levels. Changing the "Reduce Sensitivity" value will equally multiply all of them (the ratio between Smaller, Medium, and Large multiplier values will remain the same)

STANDARD DEVIATION LENGTH
"Standard Deviation Length" defines the length (number of bars) used in all calculations that utilize the standard deviation function in this script. Decreasing it will generate Liquidation Levels and Liquidation Bubbles based more on recent data. Increasing it will generate Liquidation Levels and Liquidation Bubbles based on more long-term data.

CVD LENGTH
"CVD Length" refers to the length used in calculating cumulative volumes. Decreasing it will generate Liquidation Levels, Market Order Bubbles, and apply Directional bias based more on recent data. Increasing it will generate those based on more long-term data."

LEVEL CALCULATION MODES
“Level Calculation Modes” enable you to switch between three modes of calculating the distance between the base and actual liquidation levels.

COPYRIGHT
"Copyright" option will add your username to the copyright section at the bottom of the chart, giving you credit for your analysis if you post it somewhere.
เอกสารเผยแพร่
Bug fixes
เอกสารเผยแพร่
Added Error Message
เอกสารเผยแพร่
Updated Open Interest source
Breadth IndicatorsCVDliquidationlevelsliquidationsliquidityOpen Interestsentimentstatistics

สคริปต์ที่ได้รับการป้องกัน

สคริปต์นี้เผยแพร่แบบปิดและคุณสามารถใช้มันได้อย่างอิสระ คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้แต่คุณจะไม่สามารถดูหรือแก้ไขซอร์สโค้ดได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


Register to support free indicators:
BYBIT: partner.bybit.com/b/Leviathan
WOO X: referral.woo.org/7MY2
และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ