OPEN-SOURCE SCRIPT

Liquidations Meter [LuxAlgo]

The Liquidation Meter aims to gauge the momentum of the bar, identify the strength of the bulls and bears, and more importantly identify probable exhaustion/reversals by measuring probable liquidations.

🔶 USAGE

captura

This tool includes many features related to the concept of liquidation. The two core ones are the liquidation meter and liquidation price calculator, highlighted below.

🔹Liquidation Meter

The liquidation meter presents liquidations on the price chart by measuring the highest leverage value of longs and shorts that have been potentially liquidated on the last chart bar, hence allowing traders to:

  • gauge the momentum of the bar.
  • identify the strength of the bulls and bears.
  • identify probable reversal/exhaustion points.


captura

Liquidation of low-leveraged positions can be indicative of exhaustion.

captura

🔹Liquidation Price Calculator

captura

A liquidation price calculator might come in handy when you need to calculate at what price level your leveraged position in Crypto, Forex, Stocks, or any other asset class gets liquidated to add a protective stop to mitigate risk. Monitoring an open position gets easier if the trader can calculate the total risk in order for them to choose the right amount of margin and leverage.

captura

Liquidation price is the distance from the trader's entry price to the price where trader's leveraged position gets liquidated due to a loss. As the leverage is increased, the distance from trader's entry price to the liquidation price shrinks.

captura

While you have one or several trades open you can quickly check their liquidation levels and determine which one of the trades is closest to their liquidation price.

captura

If you are a day trader that uses leverage and you want to know which trade has the best outlook you can calculate the liquidation price to see which one of the trades looks best.

captura

🔹Dashboard

The bar statistics option enables measuring and presenting trading activity, volatility, and probable liquidations for the last chart bar.

captura

🔶 DETAILS

It's important to note that liquidation price calculator tool uses a formula to calculate the liquidation price based on the entry price + leverage ratio.

Other factors such as leveraged fees, position size, and other interest payments have been excluded since they are variables that don’t directly affect the level of liquidation of a leveraged position.

The calculator also assumes that traders are using an isolated margin for one single position and does not take into consideration the additional margin they might have in their account.

🔹Liquidation price formula



or simply




Example:
Let’s say that you are trading a leverage ratio of 1:20. The first step is to calculate the distance to your liquidation point in percentage.




Now you know that your liquidation price is 5% away from your entry price. Let's calculate 5% below and above the entry price of the asset you are currently trading. As an example, we assume that you are trading bitcoin which is currently priced at $35000.



Finally, calculate liquidation prices.



In this example, short liquidation price is $36750 and long liquidation price is $33250.

🔹How leverage ratio affects the liquidation price

The entry price is the starting point of the calculation and it is from here that the liquidation price is calculated, where the leverage ratio has a direct impact on the liquidation price since the more you borrow the less “wiggle-room” your trade has.

An increase in leverage will subsequently reduce the distance to full liquidation. On the contrary, choosing a lower leverage ratio will give the position more room to move on.

🔶 SETTINGS

🔹Liquidations Meter

  • Base Price: The option where to set the reference/base price.


🔹Liquidation Price Calculator

  • Liquidation Price Calculator: Toggles the visibility of the calculator. Details and assumptions made during the calculations are stated in the tooltip of the option.
  • Entry Price: The option where to set the entry price, a value of 0 will use the current closing price. Details are given in the tooltip of the option.
  • Leverage: The option where to set the leverage value.
  • Show Calculated Liquidation Prices on the Chart: Toggles the visibility of the liquidation prices on the price chart.


🔹Dashboard

  • Show Bar Statistics: Toggles the visibility of the last bar statistics.


🔹Others

  • Liquidations Meter Text Size: Liquidations Meter text size.
  • Liquidations Meter Offset: Liquidations Meter offset.
  • Dashboard/Calculator Placement: Dashboard/calculator position on the chart.
  • Dashboard/Calculator Text Size: Dashboard text size.


🔶 RELATED SCRIPTS

Here are some of the scripts that are related to the liquidation and liquidity concept, for more and other conceptual scripts you are kindly invited to visit LuxAlgo-Scripts.

Liquidation-Levels
Liquidations-Real-Time
Buyside-Sellside-Liquidity
exhaustionleverageleveragetradingliquidationliquidationlevelsliquidationtheoryluxalgomoneymanagementPivot points and levelsPortfolio management

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Também em:

Aviso legal