TradingView
LeviathanCapital
15 Feb 2023 pukul 15.31

Swing Levels and Liquidity - By Leviathan 

BTC Perpetual Futures ContractBinance

Deskripsi

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…)

Catatan Rilis

Added:
- 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

Catatan Rilis

Fixed the issue of script not working on non-crypto pairs.

Catatan Rilis

Fix 2.0

Catatan Rilis

Errors fixed
Komentar
BallNattawut
for timeframe 1h 4h, Could you please recommend setting bar ? or 10-15 bar default the beat
tongchangyapuia2020
@BallNattawut,
I used bar right 10 and left 30.
akrem_crypto
one of best indicator creator in trading view I swear
LeviathanCapital
@akrem_crypto, thank you ❤️
GarethSA
GREAT SCRIPT.

Could i suggest something please?

If you look at this script. tradingview.com/script/p3KRhhoQ-Support-Resistance-Dynamic-v2-w-Timeframe-option/

Could you possibly do price labels like they did so its easy to see price of the top of the liquidity?
LeviathanCapital
@GarethSA, Sure!
icakpan
@LeviathanCapital, Thanks again for providing the source code for this. For all who what to hide the lines already filled(mitigated) here is an easy way i found to adapt the code. Just extract the source code to your profile to allow editing then paste (without the ") these two under line 105 of the code

"box.delete(box)
line.delete(line)"

You should end up with this in that section after the paste

" if filled and extendtilfilled
array.remove(levelLines, j)
array.remove(levelBoxes, j)
box.delete(box)
line.delete(line)"

Leave everything else in the code as is , save and you should now be able to just see the lines that are still active. All credit to the author. This is a really useful amazing piece of work here.
LeviathanCapital
@icakpan, No need. The option to hide filled levels is added.
icakpan
@LeviathanCapital, wow..you made it even more fabulous...thanks!
Lebih lanjut