Candles
Drawn from the Engine's file with SQL, as it writes it.
New York time. Prices and symbols are invented. Hover or use the arrow keys for a candle's open, high, low, close, VWAP and volume.
Quote board
Seven precomputes, read from the file. Pick a row to chart it.
| Symbol | Last | Change | High | Low | Volume | VWAP | Trades |
|---|
Trades a second, all symbols
Minute by minute, from the 1-minute candles: busy at the open and the close, calm at lunch.
Price jumps
Trades whose step from the previous trade is far outside the usual steps, kept whole.
What happened
Newest first.
Pulling the plug
The Engine is thrown away in the middle of writing a checkpoint: the whole program and everything in its memory. SQLite rolls the half-written checkpoint back, a fresh copy of the Engine opens the file, and the feed resends every trade after the last one the file holds. At 13:15 the demo does this once by itself.
| When | By | Trades only in memory | Rows written, then rolled back | Trades resent | Back in | Candles checked afterwards |
|---|---|---|---|---|---|---|
| Not yet. Press Play, then Pull the plug whenever you like. | ||||||
The race: the Engine against the compiled SQL
The first 200,000 trades of the day, rounded up to a whole second, through a fresh Engine and through the same policy compiled to SQLite triggers. Both take turns on the same thread in equal slices of time, then every value in the two files is compared.
The policy
The same short policy runs in the Engine and, compiled, in plain SQLite. Candles are window summaries; the quote board is seven precomputes.
Change the policy and compile it with the real compiler, the same program that runs the Engine here. The running demo keeps its own policy.
Results
Finishing the day, then checking every closed candle against a recount of every trade.
Every closed candle, checked
The file against a recount made straight from the trades as they were sent, by separate code that never sees the Engine.
What is in the file
Ask the file
The Engine's file is plain SQLite, the same layout the compiled SQL keeps. Pick a question or write your own, then press Run (or Ctrl+Enter, ⌘+Enter on a Mac). It reads while the day is paused or finished.