A crypto order book imbalance trading strategy, stated as a ratio. Depth is the one input that
says something about the next few seconds rather than the last few. Read it as a ratio against
the other side, never as a raw number.
1. The rule
# BUY
if TotalBidSize > TotalAskSize * 1.6 and BuyVol > SellVol:
if (Ask1 - Bid1) / Price < 0.001 and DayAmount > 50000000:
Buy()# SELL — imbalance decays fast, so the time exit is short
if ProfitPct >= 0.6 or ProfitPct <= -0.4 or HoldTime >= 180:
Sell()
2. Why a ratio and not a size
A raw size threshold means nothing. Two hundred BTC of resting bids is enormous on one venue and
unremarkable on another, and the same number means different things at 03:00 and at 14:00. The
ratio against the other side is comparable across symbols and across the day, which is the only
way a single number in your code can hold up.
Line
What it asks
TotalBidSize > TotalAskSize * 1.6
Is there 60% more resting size on the bid than the ask?
BuyVol > SellVol
Are trades actually hitting the ask, not just resting?
(Ask1 - Bid1) / Price < 0.001
Is the spread under 10 basis points?
DayAmount > 50000000
Has fifty million dollars traded today?
The spread requirement and the 180-second time exit belong together. An imbalance edge is measured
in seconds. Holding past it converts an order book read into a directional bet you did not intend
to take, and the 0.6% target is small enough that a wide spread eats it outright.
3. When this works and when it does not
It works on liquid pairs during active hours, where the book is deep enough that the ratio
reflects real intent.
It fails in two specific ways. The first is spoofing: resting size that is cancelled the moment
price approaches it. You cannot detect this from a snapshot, only from watching how often large
resting orders actually get filled on your venue. The second is depth quality. Exchanges differ in
how many levels they publish and how often they update — some send a full book on every change,
some send throttled snapshots, and a throttled snapshot makes an imbalance look stable when it is
not.
That second problem is measurable, and we measured it: see
the real cost of crypto trading for what quoted depth is actually worth across venues,
and stale quotes in crypto market data
for how often a feed stops updating while the book keeps moving.
4. Before you trade it
Record your own book first, then backtest against the recording — see
how to backtest a crypto trading strategy. A strategy whose entire premise is depth
cannot be validated on candles.
Check one number before anything else: on your exchange, how often does TotalBidSize change
between consecutive one-second rows? If the answer is rarely, your feed is throttled and this
strategy is reading a stale book.
5. What the round trip asks of it
Crypto order book imbalance: the exit block drawn to scale, and the break-even win rate before and after measured trading costs
A 0.6% target is small, so cost matters proportionally more here than in any other crypto strategy
in this library: the break-even moves from 40% to 50% at a 0.10% round trip. Ten points for a
strategy holding three minutes.
That is precisely why the spread condition (Ask1 - Bid1) / Price < 0.001 is not optional. At 10
basis points quoted, the round trip is 0.2% and the break-even goes past 60%. The gate is doing the
same job the target cannot. See the real cost of crypto trading.
Educational template for research and backtesting. Not investment advice and not a signal service.
Originally published by TraderWe on August 13, 2026. You may quote and link to this page. Republishing the full text without a link back to the original is not permitted.
I live on 5-minute candles so this whole timeframe is foreign to me, but the argument that depth only makes sense as a ratio against the other side is one I can borrow, what I'm unsure about is how often the book is being sampled, because a resting wall that vanishes the moment someone leans on it would show up as imbalance right up until it doesn't. Does anyone here filter for spoofed size, or is the trade-hitting-the-ask condition supposed to cover that?
The exit numbers are what I'd stare at: +0.6 vs -0.4 means you need well over 40% winners just to break even before fees, and at 1s–1m you're paying fees constantly. Please size this like a scalp, not a conviction trade, tiny per position, hard daily loss cap, and a rule that you stop after N consecutive stops instead of widening the -0.4. Have you got the fee and slippage assumption baked into your test, or is the 0.6 a clean number?