Swing Levels and Liquidity - By Leviathan

This script will plot pivot points (swing highs and lows) in the form of lines, boxes or labels to help you identify market structure, “liquidity” areas, swing failure patterns, etc. You are also able to see the volume traded at each pivot point, which will help you compare their significance.

Bars Left-Right

A pivot high (swing high) is a bar in a series of bars that has a higher value than the bars around it and a pivot low (swing low) is a bar in a series of bars that has a lower value than the bars surrounding it. The Bars Left and Bars Right parameters are used to define the number of bars on the left and right sides of a pivot point that the function should consider when identifying pivot highs and lows in a time series. For example, if Bars Left is set to 5 and Bars Right is set to 6, the function will look for a pivot point by comparing the value of the current bar with the values of the 5 bars to its left and the 6 bars to its right. If the value of the current bar is higher than all of these bars, it is considered a pivot high point. These parameter can be used to adjust the sensitivity of the script (lowering the Bars Left and Bars Right parameters will give you more swing points and increasing the Bars Left and Bars Right parameters will give you fewer swing points).

”Show Boxes” - This will draw a box above the swing high and a box below the swing low to help you visualise a large area of interest around swing points. Additional box types and the width of the box can be adjusted in Appearance settings below.
”Show Lines” - This will draw a horizontal line at the level of each swing high and swing low.
”Show Labels” - This will plot a circle at the high point of each swing high and at the low point of each swing low.
”Show Volume” - This will display the amount of volume traded in a given swing point candle. It can help you identify the significance of a given swing point by comparing it to the volumes of other swing points.
”Extend Until Filled” - This will extend the swing point levels until they are mitigated by the price. Turning it off will continue plotting the levels just a few more bars after a swing point occurs.
”Appearance” - You can show/hide swing points, choose the colors of labels, lines and boxes, choose the size and positioning of the text, choose line and box appearance (adjust the Box Width when switching between timeframes!) and more.

More updates coming soon (MTF, more data…)
Release Notes:
- Option to hide filled levels
- Option to view OI Delta alongside volume
- Option to only show pivots with positive/negative OI Delta
- Option to only show levels with volume > your input
- Option to only show levels with abs(OI Delta) > your input
Release Notes:
Fixed the issue of script not working on non-crypto pairs.
Release Notes:
Fix 2.0
Release Notes:
Errors fixed

Register and get access to exclusive scripts:
WOO X: referral.woo.org/7MY2

USDT(TRC20): TEv77qPZ4iC2oFbXppVEw1wZ6N6LEGokhg
ETH(ERC20): 0x29f3081160b8ddfc48383d6a8923440df839784e
BTC: 1EYHZoWFBv7wQmn7w5hxS5LdWT9PHeKic2
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?