← Back

MarketEmulator Now Uses a Standalone MatchingEngine

MarketEmulator Now Uses a Standalone MatchingEngine
MarketEmulator Now Uses a Standalone MatchingEngine

The StockSharp repository now includes a standalone MatchingEngine project. It contains pure order-matching logic without random market-data generation, commissions, or other emulator features. MarketEmulator now delegates execution to a separate MatchingEngineAdapter, allowing most of the previously embedded matching logic to be removed from the emulator itself.

The engine maintains an independent order book for each security and processes market and limit orders, partial fills, cancellations, and replacements. Post-only orders are checked for immediate execution against the book. Separate interfaces cover the order book, matching, order lifecycle, portfolios, and collateral control, allowing individual engine components to be tested and replaced independently.

Regular, stop, and trailing-stop orders are supported. The stop manager monitors activation prices and can transform a triggered condition into either a market or limit order. Extracting MatchingEngine simplifies unit testing and makes it possible to reuse the same execution logic in the emulator and other StockSharp applications.

Comments (0)

Login or Create account, Log in or register to leave a comment

No comments yet. Be the first!