Skip to main content

Module execution

Module execution 

Source
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§

ExecutionCosts
Trading costs applied to every fill.
Fill
FillSimulator
FillSimulatorConfig
Order
Position

Enums§

OrderKind
OrderSide
OrderStatus

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).