🟪Liquidation Engine
One of the first Liquidation Engines to ever be introduced on TradingView and it took over 2,000 lines of code to pull off!
For those who prefer video tutorials, this breaks down every single aspect of the Liquidation Engine here:
This Liquidation Engine consists of two unique tools, you can find them here in your TV Account:

Liquidity Theory - Understand What We Are Looking At
Liquidity Levels are a data point that advanced traders study to understand the price levels that people are likely to be liquidated out of their position.

While exchanges are allowed to show you the open orders in an order book, they are legally and morally not allowed to show you the levels where people get liquidated. However, there are Market Making Whales that specifically hunt these hidden Liquidation Levels to liquidate people's position and force their assets into the market. Remember, it only takes a split second for a candle wick to knock someone out and these Whales are very efficient at hunting down these vulnerable positions.
Rainbow Trends dove deep into the math, algos and theories behind this type of data and developed our own Liquidation Engine that runs inside Trading View.
How It Works
Since the real Liquidation Levels are not published by the exchanges, we had to develop an an advanced algorithm to assess the data and predict where these levels occur. By looking at the current prices, buys/sells and volumes of the asset, our Liquidation Engine can layer the levels where these liquidations are likely to occur.
Why It Matters
When a seasoned Rainbow Theory Trader can assess where a major liquidation event is likely to occur, they can position their trades prior to the Whales making their move to push price to the projected liquidation level.
Trader Math
Traders using Perpetual Futures trade using different levels of Leverage for their positions. The higher the leverage the more vulnerable their position is to being liquidated by a Whale.
We cannot know the exact amount of leverage the Traders are using, but we can predict the more common levels of leverage that are used. The Liquidation Engine crunches all of the numbers based on four levels of leverage:
5X Leverage
10X Leverage
25X Leverage
50X Leverage

Depending on the Trader's preference, these levels can be individually toggled on/off as well as color coded.

Alternative View w/Color Coded Liquidation Levels:


Above and below the Candles you can see the Projected Liquidation Levels. These levels appear at the price level that the Liquidation Engine calculates and remain in place until they have been liquidated (touched by a candle or wick). In these charts, the Liquidation Engine is also providing the Trader valuable insight on the Liquidations:
Thickness of the Level - Indicates the size of the position (Thicker Lines are larger positions)
Color of the Level - Indicates the amount of leverage on the position (5x,10x,25x,50x)
Length of the Level - How long the calculated leveraged position has been open.
Tuning Options

The first options let the Trader filter the size of the positions as well as the sensitivity to the positions. This Algorithm tries to not plot every single detected Long/Short so it has a built in filter:
Sensitivity Filter - This allows Traders to adjust the overall threshold for the Liquidity Engine when it is inspecting the positions in the market. Increasing this number will reduce the number of positions on the screen (focusing on the larger ones) and decreasing the number will increase the number of positions on the screen (allows the algo to consider smaller positions).
The second option allows the Trader to toggle specific levels. Toggling these on and off allows the Traders to finely tune the type of positions they want to chart liquidity on.

As with most of our tools, color adjustments are available as well. This allows Traders to specifically pick the exact colors they want displayed on their charts as well as the opacity.

The Liquidation Engine also keeps tallies on the amount of estimated Long Positions vs Short Positions. This is displayed on the bottom right and can be edited with the Table Display Options.
Table On/Off - Toggles the table off/on
Table Position - Allows the table to be displayed on different parts of the chart
Table Background Color/Table Text Color - Allows custom background and font colors to be chosen
Liquidation Engine - Delta
In addition to calculating the number of long/short positions, the Liquidation Engine also calculates the estimated amount of difference between the Longs/Shorts in a dollar amount form. Often times the Order Books get swayed too far in one direction and the Whales will force a move in the opposite direction to bring everything back into balance. This puts our Traders ahead when they can detect and predict that a move to rebalance may occur soon.

Tuning options for this tool are identical to the Liquidation Levels tool. Note that if the Trader changes the Liquidation Levels Tool Settings, they should mirror those Settings for the Liquidation Engine so that the tools are in synch with the data.
Best Practices
Timeframes
This tool typically is used by our Traders on candles under 60min.
It can be used on higher time frames, but most of our Traders utilize 15min candles or smaller.
Load Times
This Algorithm runs a lot of calculations to pull this off on over 2,000 lines of code. Due to this it takes TradingView servers a very long time to process. When you make changes, keep an eye on the moving wheel on the top left of the screen or the three animated dots. This will indicate that the TradingView servers are currently running the required calculations.

Market Data / Levels Out of Range
This Algorithm runs on a lot of data, in the event that you are trading and having issues with the Liquidation Levels being too far away from price action, make sure that you check the trading hour settings in the bottom left of your chart.
ETH - Electronic Trading Hours | RTH - Regular Trading Hours

If you are still having issues or have questions, please feel free to reach out to us at admin@rainbow-trends.com or message us in the Rainbow Trends Discord.

Last updated