What does it show
It shows various portions of Bid and Ask order book according to user selected configurations. Because different configurations may involve different number of price levels (up to the full market depth), it would be difficult to compare the summation of the order book sizes within different settings. Therefore the indicator allows to normalize the result according to the settings. If corresponding checkbox is selected, the output is the average order book size per price level within selected configuration. Think of it as an array of weights which has different length and shape according to the settings, but the sum of all weights is always 1 (100%). To clarify, this averaging is done over the involved price levels and according to weights defined by the computation mode. It has nothing common with averaging over time, so it doesn't cause any lag (if you wish to smooth the lines over time, configure the "Smooth" option). For instance, if you use "Number of price levels uniformly mode" with 10 levels, the indicator will show the sum of 10 levels divided by 10. If you switch to 5 levels, it will show sum of 5 levels divided by 5. This allows to change the settings, switch between computation modes, and compare the values on the same scale even if you switch into computation of all available price levels. Note that if you deselect "average per price level", the indicator will reload each time when you change the settings. This will not be needed soon, after we will allow backward computations with market depth (in development).
How to import Liquidity Tracker into Bookmap
Download its jar file here into, for instance, 'C:\Bookmap\MyAPICustomModules/' folder. In Bookmap click Settings->Strategies->Add... and select the jar file, select the indicator, and click Load. Then enable it with a checkbox on the left side and click on the Liquidity Tracker button to view or adjust its settings. You should see something like this:
For more detailed instructions on how to import API modules into Bookmap, please review this post. Also, please review API Requirements, limitations, and known bugs.
All the configuration items are supposed to be self explaining. Exponential half-life parameter means that the weights given to price levels are gradually exponentially decaying farther from the market (best bid or ask) while the weight of the size at the first (best) price level is always 1 (i.e. 100%) and then drops by half every <half-life> number of levels. For instance, within half-life parameter of 10, the weights will be the following:
- level=0 (best price), weight=100%
- level=10, weight = 50%
- level=20, weight = 25%
- level=30, weight = 12.5%, and so on...
- level=N, weight = exp(-log(2)*N/halflife)
Your feedback, bugs report or improvement requests will be much appreciated.
PS: Here is a challenge: explain this perfect correlation where the settings are:
- All available price levels uniformly
- "Display average per price level" deselected
- Smoothing disabled (zero lag)
It does not recalculate backwards when added and when settings are changed. Historical market depth is already supported by API, so only the indicator need / will be updated accordingly.