Called when a DCA (average-buy) entry is committed.
Called when a breakeven stop is committed (stop loss moved to entry price).
Called when a partial loss close is committed.
Called when a partial profit close is committed.
Called when a new signal is closed (take-profit, stop-loss, or manual close).
Called when a new signal is opened (position entry confirmed).
Called when a trailing stop update is committed.
Called when a trailing take-profit update is committed.
Called once before first use. Connect to exchange, load credentials, etc.
Broker adapter interface for live order execution.
Implement this interface to connect the framework to a real exchange or broker. All methods are called BEFORE the corresponding DI-core state mutation, so if any method throws, the internal state remains unchanged (transaction semantics).
In backtest mode all calls are silently skipped by BrokerAdapter — the adapter never receives backtest traffic.
Example