2 Commits
Author SHA1 Message Date
mika@stocksharp.com bfba88fb4b StopOrder: percent-based activation, limit and trailing offset
Add IPercentStopOrderCondition with three flags (IsActivationPricePercent,
IsClosePositionPricePercent, IsTrailingOffsetPercent) and carry them
through StopOrderCondition / StopOrderInfo.

StopOrderManager:
- percent limit price: resolved at trigger time against the actual
  activated stop price (Buy: stop*(1+pct/100), Sell: stop*(1-pct/100))
- percent trailing offset: stop price recomputed each tick from the
  high/low watermark (Sell: high*(1-pct/100), Buy: low*(1+pct/100))

Percent activation is resolved by the caller (server side) because it
requires a market-price snapshot that the matcher does not track.
2026-04-19 09:45:52 +03:00
mika@stocksharp.com edc2c199c8 Add stop order support to MatchingEngine
Add StopOrderCondition, IStopOrderManager and StopOrderManager with support
for stop-market, stop-limit and trailing stop orders. Integrate stop order
processing into MarketEmulator (register, cancel, trigger on L1/tick prices).
Add 14 unit tests for StopOrderManager.
2026-03-05 06:26:03 +03:00