Fills
How orders become trades.
No look-ahead
An order you place while handling the bar at time t is eligible from the next bar onward — never on the bar that triggered it. This is the single most important guard against a backtest that looks brilliant and trades impossibly.
Market and limit
- Market order → fills at the next bar's open.
- Limit buy → fills at your limit price when a later bar's low touches it (
low <= limit). - Limit sell → fills when a later bar's high touches it (
high >= limit).
End-of-session / end-of-period liquidation
When a position is force-closed (intraday session close, or the end of a long backtest), it is closed at that bar's last price.
Fills are currently frictionless — no slippage or fees. A configurable realistic-fill model (slippage, fees, crossing the spread) is the next addition. Until then, read intraday and high-turnover results as an optimistic ceiling.