Expand description
Provider-neutral order/fill simulator: orders, partial fills, pyramiding, costs, position state. Provider-neutral order/fill simulator: market/limit/stop/stop-limit/trailing orders, partial fills bounded by a per-bar participation cap, pyramiding (multiple same-direction fills accumulating one position), fees/spread/slippage, and explicit position state.
Intrabar fill logic is a documented approximation, not a claim of perfect intrabar path replay: a bar’s open/high/low/close order is assumed (configurable), and whichever of high/low is reached “first” under that assumption determines which side of a bar a resting order fills against. Real intrabar order is unknowable from OHLC alone.
Structs§
- Execution
Costs - Trading costs applied to every fill.
- Fill
- Fill
Simulator - Fill
Simulator Config - Order
- Position
Enums§
Functions§
- submit_
bracket - A simple bracket helper: submits an entry order plus stop-loss and take-profit exits that mirror it. Not itself stateful — callers manage the returned IDs (e.g. cancel the untouched exit once the other one fills, which this simulator does not do automatically since it has no concept of linked orders).