Liquidity Analysis

The same math used in this script can be applied on other types of profile-like data: orderbooks, trading volumes of all options for each strike.
Important: market or volume profile, just as orderbooks and options traded volume by strikes, are all liquidity ‘estimates’, showing where liquidity is more likely or less likely to be. These estimates however, especially combined with other info, are really useful and reliable.
This script works with inferred volumes vs the provided one. It's the better choice for equities, bonds; neutral choice for currencies; and suboptimal choice for natural & artificial commodities.
Contents:
- Output description;
- How to analyze & use the outputs;
- How to use it together with upcoming (Signed) Volume Analysis script;
- How did I use both scripts to finish The Leap profitably and skipped many losses.
1. Output description
- Color of the profile reflects the liquidity imbalance state: red is negative, purple is neutral, blue is positive.
- Bar coloring represents history values of liquidity imbalance for backtesting purposes. It can be turned on/off in the script's Style settings.
- Two purple vertical lines represent calculated borders of excessive liquidity (HVN), scarce liquidity (LVN), and sufficient liquidity (NVN) zones.
- Vertical dash line marks the moving window end, this way you can be certain over what exact data you see the profile was built.
2. How to analyze & use the outputs
Setup up the script:
- Moving window length: set it to ~ ¼ of your data analysis window. E.g if you see on your charts and use ~ 256 bars, set the length to 64.
- Native tick size multiplier: leave it at 0 to calculate optimal number of rows automatically, or set it manually to match native tick size multiples you desire.
- Use 2 timeframes: main one and a far lower one 3 steps down, just like on the screenshot.
- Native lot size multiplier allows to round profile rows themselves to nearest multiples of native lot size. I added this just in case any1 needs it.
Find out current liquidity imbalance state:
As mentioned before, based on profile color, it can be negative, neutral or positive. This is the state variable that changes slowly and denies/confirms the signals that would be explained in the minute.
I use my own statistically grounded imbalance metric (no hardcoded/learned thresholds), that unlike mainstream imbalance metrics (e.g orderbook imbalance as sum of bids vs sum of asks) provides a natural neutral zone, when liquidity imbalance is ofc there but not strong enough to be considered.
…
Profile-based signals: look at profile shape vs 2 vertical purple lines.
- where profile rows exceed the left purple line, these prices are considered HVN. Too much potential liquidity is there.
- where profile rows don’t exceed the right purple line, these prices are considered LVN. Potential thin/lack of liquidity is expected there.
- where profile rows are in between these 2 purple lines, these are NVN, or neutral liquidity zones.
Trading ruleset itself is based on couple of simple rules:
- Only! Use limit orders hence provide liquidity in LVNs and Only! use stop-market orders hence consume liquidity in HVNs;
- These orders should be put in advance ‘only’. This is how you discover the direction or orders: you can only put sell limit orders above you and buy limit orders below you, and you can only put buy stop orders above you, and sell stop orders below you.
This is really it. It may look weird, but once you just try to follow these 2 rules letter by letter for 1 hour, you’ll see how liquidity trading works.
Now once you know that, just don’t open new trades against the liquidity imbalance state. So don’t open shorts when the profile is blue, and don’t open longs when it’s red.
The last part is multi-timeframe logic. Prefer to act when a lower timeframe is Not against the main timeframe. That’s all, no multiple higher timeframes are needed.
3. How to use it together with upcoming (Signed) Volume Analysis script.
That upcoming script would also have a mean to generate its own signals, and another state variable called volume imbalance.
So now you’re not only looking at liquidity imbalance but also at volume imbalance that would deny/confirm a profile based signal. You need at least one of these to favor your long or short.
This is the same logic widely used in HFT, where MM bots cancel/shift/resize orders when book is too onesided And ordeflow is one sided as well.
4. How did I use both scripts to finish The Leap profitably and skipped many losses.
Even tho you can use structural information as your main strategic layer, as many so-called orderflow traders do, I traded in objective style: my fade signals were volatility based in essence, and I used ordeflow for better entries and stops, but most importantly to skip losses.
When ‘both‘ liquidity imbalance and volume imbalance (in their main timeframes) were against my trades, I skipped them all, saving many ~$500 stop losses (that was my basis risk unit for the Leap). Unless I had a very strong objective signal, i.e confluence of several signals, or just one higher timeframe signal, I did all these skips.
I traded ~ intraweek timeframe, so I was analyzing either the last 230 30min bars or 1380 5min bars. Both Liquidity Analysis and (signed) Volume Analysis scripts were set to moving window length 46 or 276 for either granulary.
I finished the leap with 9% profit and max DD ~ 5%, a bit short of my goal of 12.5%. If not these 2 scripts I would’ve finished a bit above breakeven I think.
∞
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente gorx1.
TradingView NON consiglia di acquistare o utilizzare uno script a meno che non si abbia piena fiducia nel suo autore e se ne comprenda il funzionamento. È inoltre possibile trovare alternative gratuite e open source nei nostri script della community.
Istruzioni dell'autore
t.me/synchro1_channel
linkedin.com/company/synchro1
Declinazione di responsabilità
Script su invito
Solo gli utenti approvati dall'autore possono accedere a questo script. È necessario richiedere e ottenere l'autorizzazione per utilizzarlo. Tale autorizzazione viene solitamente concessa dopo il pagamento. Per ulteriori dettagli, seguire le istruzioni dell'autore riportate di seguito o contattare direttamente gorx1.
TradingView NON consiglia di acquistare o utilizzare uno script a meno che non si abbia piena fiducia nel suo autore e se ne comprenda il funzionamento. È inoltre possibile trovare alternative gratuite e open source nei nostri script della community.
Istruzioni dell'autore
t.me/synchro1_channel
linkedin.com/company/synchro1