The Architecture of an Automated Trading System
The six subsystems between a strategy definition and a filled order, what each is responsible for, and where the hard failure modes live.
The interesting complexity is not the strategy logic. It is reconciliation between what you believe your positions are and what the broker says they are.