Paper trading
A full simulated broker fed by the chart's own bars, live or in bar replay.
The paper broker (createPaperBroker) is a real adapter with an account and a ledger. The shell feeds it the active chart's bars, so live ticks and replay steps both trigger fills.
| Order | Fills when | At |
|---|---|---|
| Market | Immediately | The current bar's close, plus slippage |
| Limit | The bar's range reaches the level | The better of the open and the level |
| Stop | The bar's range reaches the level | The worse of the open and the level, plus slippage |
| Gap through a level | On the bar that gapped | The open |
- When a single bar reaches both TP and SL, the broker fills the stop and counts an ambiguous fill. It cannot know which came first inside one bar, so it assumes the worse.
- One net position per symbol. A reversal closes fully, then opens the other side.
- Commission is charged on every fill's notional.
Reset accountin the panel clears orders, positions and history.
In bar replay
Start replay from the toolbar (Shift+R), pick a start bar, and trade from the replay bar's Buy / qty / Sell or with B, S, X. Each step forward hands the new bar to the broker, so pending orders evaluate and brackets trigger. Stepping back does not rewind the account: the ledger is a journal.
The gap after replay is not traded
Ending a session does not evaluate the bars between the replay cursor and the live edge. A bracket the market crossed inside that gap does not fill; the position resumes marking from the live price.