OFI (order flow imbalance, book model)

OFI, order flow imbalance in the Cont, Kukanov and Stoikov sense, is a signed measure of net pressure computed from changes in the resting order book: bids added or pulled and asks stepping in or backing away, level by level. It is distinct from the footprint imbalance, which compares executed bid and ask volume.

Senzoukria · Glossary · Updated September 2026


Same words, different instrument

Two things are called order flow imbalance in trading. The footprint version compares volume executed at the ask with volume executed at the bid, usually diagonally, and flags cells where one side dominates. OFI as a model reads the book, not the trades: it accumulates every change in resting size at the best levels, so that price can register pressure even when nothing has traded yet. A large ask being cancelled counts as buying pressure just as a market buy lifting it would.

How the contribution of each level is computed

  • Bid side: if the bid price at a level moves up, the new size counts as buying pressure (positive). If the price holds, the change in size counts. If the bid retreats, the old size counts as pressure lost (negative).
  • Ask side, mirrored: an ask stepping closer or growing is selling pressure (negative); an ask backing away or shrinking removes selling pressure (positive).
  • Contributions are summed over an interval. The single-level form uses the best bid and ask only; the integrated form repeats the computation on each of the top N levels and adds them up.
  • Raw OFI is in contracts. Dividing by an average depth per level makes readings comparable across sessions and instruments; without that step the same figure means a shove on a thin overnight book and nothing at a busy open.

What it explains and what it does not

The original paper by Cont, Kukanov and Stoikov (2014) reports that OFI explains contemporaneous price changes better than signed trade volume does, and later work on the integrated multi-level form reports the same ordering. The reason is that most of what moves price never prints on the tape: orders are added and pulled between trades, and the book reshapes constantly. The limit is equally important: the relation is contemporaneous. OFI describes the move happening in the same interval; used to forecast the next interval it carries no reliable content. Treat it as a state reading of the book, useful as confirmation at a level chosen for other reasons.

In Senzoukria

OFI is the second number of the QI / OFI gauge in the Microstructure (quant) indicator, found under the Quant models group of the indicators panel. Its parameters are OFI levels (1 to 20, default 10) and OFI smoothing, an EMA over a configurable number of book events (default 20). The displayed value is depth-normalized. The gauge uses a ±0.15 dead zone: above +0.15 tints green, below −0.15 tints red, in between stays neutral. The indicator's own description states that the reading is contemporaneous and not predictive. It requires a depth feed; a source that delivers trades without book updates cannot compute it, and depth entitlements are billed by the data provider.

Common mistakes

  • Confusing OFI with the footprint imbalance ratio; one reads resting size, the other executed volume.
  • Using the raw, un-normalized value and comparing overnight readings with the cash session.
  • Reading OFI as a forecast of the next bar rather than an explanation of the current one.
  • Running it on a feed that only sends top-of-book while expecting a ten-level integration.

This page in other languages

Frequently asked questions

Which is better, OFI or cumulative delta?
They answer different questions. Cumulative delta is the tape: what actually traded and on which side. OFI is the book: what is waiting, appearing and vanishing. A rally with rising CVD but flat OFI is eating a book that is not replenishing, which is information neither measure gives alone.
Why does my OFI reading swing so much?
Per-event OFI is noisy by nature, because every cancellation and every new order changes it. Smoothing over a number of book events, twenty by default in Senzoukria, shows the direction of the flow rather than the flicker. Setting the smoothing to 1 displays the raw value.
Does OFI work on crypto?
The computation only needs a depth stream with level changes, which crypto exchanges provide. In Senzoukria the crypto pairs are available for analysis only, and the accuracy of OFI depends on how many levels and how frequent the depth updates from the exchange are.

Keep reading