3 Commits
Author SHA1 Message Date
mika@stocksharp.com 1999e27064 Emulator matching: skip per-message work when there is nothing to match
Two early-outs on the per-message matching hot path, which runs millions of times
per backtested month:

- OrderLifecycleManager.GetExpiredOrders/ProcessTime allocated a List on every
  call even when no order had an expiry set. Return an empty enumerable when
  there are no tracked expiry times.
- MatchingEngineAdapter.CheckLimitOrders read BestBid/BestAsk and scanned the
  active orders on every tick/quote. Return immediately when no order is resting,
  skipping those reads and the scan in the overwhelmingly common case.

Both fire only when the respective collection is empty, so whenever orders exist
the original path runs unchanged and backtest results are unaffected.
2026-06-01 23:51:15 +03:00
mika@stocksharp.com 0bcf594d25 Use Ecng Common extensions across codebase
Replace standard .NET APIs with Ecng.Common equivalents:
- Math.Min/Max/Abs/Round → .Min()/.Max()/.Abs()/.Round()
- string.IsNullOrEmpty → .IsEmpty()
- string.Format → .Put()
- Encoding.UTF8 → .UTF8()
- Enum.GetValues → Enumerator.GetValues<T>()
2026-03-29 17:04:00 +03:00
mika@stocksharp.com db29e70fde Extract MatchingEngine project from Algo.Testing
Move 9 core matching engine files (OrderBook, OrderMatcher, PortfolioManager,
MarginController, OrderLifecycleManager) into standalone MatchingEngine project
with namespace StockSharp.MatchingEngine. MarketEmulator stays in Algo.Testing
and references MatchingEngine. Update all solution files and test references.
2026-03-05 06:25:55 +03:00