5 Commits
Author SHA1 Message Date
mika@stocksharp.com b88b64d785 Let the stop manager answer what rests on a security
The manager already indexes its stops by security for CheckPrice, but the
interface offered no way to read that index, so every caller that needs to walk
the stops of one instrument had to keep a second index of its own over the very
same objects.

GetStopIds hands out the transaction ids resting on a security, copied out under
the same lock every other operation runs under and filtered to the stops that are
still registered, since CheckPrice prunes its per-security list lazily.
2026-08-31 01:39:05 +03:00
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 96cae9b7a6 Add TakeProfit (InvertTrigger) tests for StopOrderManager 2026-04-12 18:53:14 +03:00
mika@stocksharp.com 3ea2a3866a Add stop order Replace support and SmaServerStopStrategy 2026-03-05 17:56:13 +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