
BTC on 5-minute bars in the 0xArchive Terminal, 2026-10-15.
Open on a chart
Load it on BTC 5m in the terminal, then change its settings or open it in the script editor.
oiDelta. Its sign says what the trade did:
The bars are opening flow: new longs less new shorts, in USD. The line is closing flow: shorts bought back less longs sold out. A rally on closing flow is shorts running for the exit; a rally on opening flow is new money taking a side.
How it works
Two tallies collect the bar’s trades as they arrive, one for each kind. A trade with anoiDelta of 0 moved no open interest (one side opened while the other closed), so it counts in neither. tape.available is false on bars older than the trade history, which reaches back to the start of the UTC day before yesterday, so those bars stay empty.
Try changing
- Raise Smallest trade to see only the larger players’ flow.
- Plot
opening.value + closing.valueas well: that is the bar’s ordinary taker delta, which mixes both.
The script
opening-closing-flow.ts