Depth of market and order flow
Depth of market is the resting liquidity on both sides of an instrument's order book: how much size is bid at each price below the market and offered at each price above it. A DOM ladder is the vertical grid that displays it — one row per price, bid size on one side, ask size on the other, updating as the book changes — and it doubles as an order-entry surface, because on a ladder the row you click already names the price.
Order-flow trading is the discipline built on the layer beneath price: not where the market went, but the executions and the resting size that took it there. Which side was the aggressor, how volume distributed across prices inside a bar, whether the buying is cumulatively outrunning the selling, and whether the flow arriving is the kind that tends to be informed. Vike Trader ships both — a click-to-trade ladder over a live book, and a pure trade-aggregation core that folds the tape into footprints, volume profiles, cumulative delta and microstructure studies.
The DOM ladder
The ladder is a separate window in the desktop app, and it paints directly over the live level-2 book with no dependency on the execution core: it renders from caller-owned state and borrowed inputs, and every trader intent leaves as a neutral action the app maps to a command. It is the same data-in, actions-out seam the chart uses.
It centres on the book's mid rather than on the last trade, so real depth stays in view even when the last-trade mark lags a few ticks; scrolling latches a manual centre. Depth bars scale against the largest grouped quantity across the visible rows, the last-trade row is highlighted, and your position's average price gets its own marker. A toolbar carries quantity presets, a price-grouping selector in tick multiples, a recenter button and a reduce-only arm. The venue the ladder is showing cycles from its header across the venues whose live books are wired.
Until the first real book snapshot lands the ladder paints a synthetic stand-in seeded from the instrument's own tick size, so the grid geometry is right from the first frame. If no book update arrives inside the freshness window the ladder dims and the header says so — a frozen book never reads as a live one.
The header badge is where a click's order actually goes. It paints PAPER or LIVE, and it reads LIVE only when the selected venue has a credential-gated live execution client behind it. This is not decoration: the ladder is the fastest order-entry surface in the app, and the one place where a wrong assumption about which account you are on costs the most.
Click-to-trade
The interaction grammar is side-bound: the column decides the side — buy on the bid side, sell on the ask side — and the row decides the price. Limit versus stop resolves by side of market, which is the rule that makes a ladder safe to click quickly: a buy placed above the ask, or a sell below the bid, would cross immediately, so it becomes a stop instead; holding a modifier key forces a stop regardless.
- Clicking your own resting order cancels it.
- Dragging your own resting order reprices it in place.
- The footer carries close and reverse, plus cancel-this-side buttons.
Drag-to-reprice is offered only where the venue supports a native modify. The widget consults that venue's declared adapter capabilities at drag start, at the drop and at the marker affordance, so a venue with no native modify simply does not offer the gesture rather than letting it become a rejection after the fact; an unknown venue resolves to a capability set that offers nothing.
Every action then drains through the one place a UI intent becomes a command, where a local preview runs before anything reaches the command lane. What that preview can measure differs by shape and is stated rather than implied: a priced order is capped on notional, computed with the instrument's contract multiplier so the interface measures the same quantity the risk gate does; a close or reverse is a market leg carrying no price, so no notional is measured for it and only the quantity bounds apply. The venue-side risk gate remains the authority either way.
Cost to fill
An opt-in footer readout, off by default so the ordinary render path is unchanged. For a hypothetical market order of a given size it walks both sides of the displayed book and shows the projected average fill and the slippage against the mid.
The walk is not a second implementation. It is the same book walk the execution-side slippage veto performs, so the basis points you read on the ladder are the basis points the gate compares against its budget. Two known divergences are stated in the readout itself rather than left to be discovered: when the displayed book cannot cover the size the slippage renders as infinite — that is exactly the case the gate rejects as not fillable — and the gate rounds size to the venue's lot grid while the readout walks the size as typed. A one-sided book shows no slippage number at all rather than a fabricated zero.
The liquidity heatmap
The ladder has a second mode in which the region splits: a time-by-price liquidity heatmap strip takes the left portion and the ladder keeps the rest, the two sharing row geometry so a price reads across at the same height. The heatmap is a fixed-capacity ring of per-row intensity columns, pushed on a throttled cadence and normalised against a running peak — so what you are reading is where resting size has been accumulating and where it has been pulled, on the same price rows you are about to click.
Footprint
A footprint breaks each bar into a column of per-price cells and splits the volume in each cell into aggressive buying and aggressive selling. It answers a question a candle cannot: where inside this bar did the volume trade, and who was crossing the spread to get it.
The builder holds one open grid keyed by price bucket and closes it into ascending cells when the caller says the bar ended. Two consequences of that design are worth holding:
- A cell's price is a grid price, not a traded price. Every trade that rounds into the same bucket lands in the same cell, and the bucketing has exactly one rounding site in the whole crate.
- The bar boundary belongs to the caller. The builder has no clock and no threshold, so whoever closes the bar decides what a bar is — a time interval, a tick or volume bar, or anything else.
On the chart, each cell is painted with a faint imbalance tint, and the bar's own point of control — the cell with the most combined buy and sell volume — gets an outline. The buy and sell numbers appear only when the cell is tall enough to be legible; below that the tint alone carries the read, rather than numbers nobody can resolve.
The app's aggregation is careful about a tick that arrives before there is a bar to put it in, because that is where silent loss lives. A tick with no bar grid yet is held and folded in at its own bar on the first later ingest that carries one, up to a bound; a tick that genuinely predates the first bar is discarded, because the cell list is index-aligned to a bar list that only grows forward — and it is counted and warned about, because discarding was correct and discarding silently was the defect.
Volume profile
A volume profile is volume at price rather than volume over time: a horizontal histogram of how much traded at each price level across a range, with two derived levels — the point of control, the price with the most volume, and the value area, the contiguous band around it holding seventy percent of the range's volume.
On the chart it is an overlay pinned to the right edge of the visible x-range, windowed to the same visible bars the footprint is, with the bucket width coming from one shared derivation so the two always agree for the same range. It is computed by merging the visible bars' own footprint cells — the same structure, reduced — and the tests confirm that merging every bar's footprint reproduces exactly what building a profile over the same trades directly produces, bins, point of control and value area alike.
Cumulative volume delta
CVD is the running sum of aggressive buy volume minus aggressive sell volume. A rising CVD means aggressive buying has exceeded aggressive selling since the accumulator started, whatever price did meanwhile — and the interesting readings are the ones where those two diverge.
Buy and sell come from the crate's one load-bearing semantic: a trade whose buyer was the maker is a sell, otherwise it is a buy. That single classification defines delta everywhere else in the crate, so the footprint, the profile and CVD cannot disagree about which side was aggressing. Zero-size trades are skipped everywhere, and the fold is naive and order-dependent by design — which is what lets the streaming accumulator and its batch twin be compared as raw bit patterns rather than approximately.
On the chart, CVD gets its own pane and is derived from the footprint substrate rather than from a second pass over the tape, so the app feeds one structure and the renderer computes three views from it.
VPIN
VPIN — volume-synchronized probability of informed trading — estimates order-flow toxicity: the risk that the flow arriving is informed, which is the risk a liquidity provider is being picked off. It is measured on a volume clock rather than a time clock, which is the whole idea: a quiet hour and a violent minute contain very different amounts of information, and bucketing by volume makes them comparable.
The trade stream is chopped into fixed-volume buckets; a trade that overflows the open bucket spills its remainder into the next. Each completed bucket scores an imbalance — the absolute difference between buy and sell volume, over the bucket size, so it lands between zero and one — and VPIN is the rolling mean of the last several completed buckets, maintained as a rolling sum rather than a window re-scan on the hot path.
Two estimators of the same quantity ship. The first classifies each trade by its aggressor flag, falling back to the quote-midpoint test when a feed carries none. The second is the canonical bulk volume classification form, which needs no aggressor flag at all: a bucket's directional split comes from its price change scaled by the standard deviation of recent bucket price changes, through the standard normal distribution. That one also exposes a signed reading beside the magnitude — buy-toxic versus sell-toxic — so a caller can route the magnitude onto a per-side gate rather than pulling both quotes.
Degenerate inputs are handled rather than producing a plausible number from nothing: an undefined price-change deviation, or a warm-up with too few samples, falls back per bucket to the tick rule, so a flat tape yields zero rather than a not-a-number and a one-way tape yields one.
Neither estimator emits a signal. VPIN is a level, not an alarm. Turning one into a threshold that adapts to its own history is what the crate's streaming-quantile estimator exists for; today that composition is yours to make.
Order-to-trade ratio and book imbalance
Two more folds read the book rather than the tape.
- Order-to-trade ratio
- Quoting intensity inferred from consecutive book snapshots. For each side, two consecutive snapshots of the top levels are compared price by price: a price present only in the new list is an add, present in both with a different quantity is an update, present only in the old list is a cancel. Per fixed event-time window the ratio is adds plus twice the updates plus cancels — an update being a cancel-and-replace, hence two messages — divided by the trade count floored at one, minus one, so zero means parity.
- Depth imbalance
- Book pressure across the top levels, both as a plain depth-of-N reading and as an inverse-distance-weighted one, so size resting close to the touch counts for more than size parked far behind it.
The order-to-trade ratio is a visible-window proxy, not exchange message truth, and the crate says so rather than implying otherwise. Without an order-by-order feed, messaging activity can only be approximated by diffing the visible top levels — so a level pushed out of the window by a better price counts as a cancel by construction. Read it as activity at the visible edge of the book, not as a message count.
What is wired where
The pieces above sit at three levels, and it matters which is which.
- In the desktop app, today
- The DOM ladder with click-to-trade, the liquidity heatmap and the cost-to-fill readout. On the chart: the Footprint style, the volume-profile overlay and the CVD pane — the three views derived from the footprint substrate, each with its own toggle, persisted per window.
- In the chart engine, with tests, but not yet reachable from a menu
- VPIN, book imbalance and order-to-trade ratio exist as oscillator-pane studies: each keeps an incremental fold over the live tick stream and samples its committed value when a bar closes, carrying the last value through a quiet bar because a flat segment is the truthful reading. The app currently assembles its chart inputs with an empty study slice, so no picker adds one. They are an engine capability, not a menu item — stated here because the alternative is letting you find out after you downloaded it.
- In the crate, for anything that consumes it
- All nine folds, pure and engine-free: the classification semantic, the flow-bar builders (tick, volume and dollar bars plus the information-driven variants), CVD, footprint, volume profile, depth imbalance, order-to-trade ratio, VPIN and a single-quantile estimator. The whole crate depends on the vocabulary crate and one pinned maths library, and nothing else.
A book-dependent study renders nothing until a book snapshot has actually arrived — no fabricated values — while VPIN needs trades only. And the builders are gated against hand-computed expected values rather than against a golden file, with streaming and batch forms compared as raw bit patterns where a batch twin genuinely exists as a separate slice computation.
Run it yourself.
Every venue mounts paper by default. Nothing below trades anything until you say so.
Free. Source-available under FSL-1.1; every release becomes Apache-2.0 two years on.
Trading involves substantial risk of loss and is not suitable for every investor. Nothing on this page is investment, financial or trading advice, and no result shown or described — backtested, simulated, paper or live — is a promise of future performance. Backtested and simulated results in particular have inherent limitations: they are produced with hindsight, do not reflect every real-market condition, and no representation is made that any account will achieve results similar to them. Vike Trader is software; orders sent from your accounts, the credentials that authorize them and the decisions behind them remain yours. Consider your circumstances, and never trade money you cannot afford to lose.