Skip to main content
Order-flow forecast on a BTC chart

BTC on 1-hour bars in the 0xArchive Terminal, 2026-10-25.

Open on a chart

Load it on BTC 1h in the terminal, then change its settings or open it in the script editor.
A forecast of the return over the next Bars ahead, in basis points, from three readings only 0xArchive has together: the bar’s taker imbalance, its change in open interest, and the funding rate. Under it, Skill: the correlation of each forecast with the return that actually followed, over the last 500. Skill near 0 means the model knows nothing on this market and interval, and that is a real answer.

How it works

Each reading becomes a z-score over 200 bars (stats.zscore), so the three weigh alike. ml.forward holds each bar’s readings until the return after them is known, and only then hands them to ml.rls, which learns from every bar so far with older bars weighing less (Memory). Forecasts are graded the same way: a second ml.forward keeps each one until its outcome exists.
A model’s skill on the bars it was built and tuned on is not evidence. Change the inputs or the settings while watching Skill, and you will find settings that look good by chance.

The script

order-flow-forecast.ts

Next step

See the next example, RSI PCA forecast.
Last modified on October 25, 2026