Commit Graph
163 Commits
Author SHA1 Message Date
mika@stocksharp.com 87f72eb6e1 Localize public core enum captions with Display resources 2026-10-22 17:58:49 +03:00
mika@stocksharp.com 6e7a7dae22 Move instrument lookups and persistence to async
Instrument lookups, configuration, credentials, CSV entities, snapshots and
the alert processing service are read and written asynchronously; the
blocking synchronous forms are obsolete wrappers.

IAsyncPersistable replaces IPersistable: every type that saves and loads its
settings has LoadAsync and SaveAsync only, and nested objects are read with
GetValueAsync, LoadEntireAsync and LoadAllAsync. The synchronous Load and Save
are the obsolete Ecng extensions. The MultiConnect sample keeps IPersistable
for two settings classes, because the settings window of the published
StockSharp.Xaml package takes it.

Copies that were made by saving and loading are made asynchronously.
IMessageAdapter, IIndicator, the risk, commission, PnL, latency, slippage and
position managers, IStorageBuffer, Strategy, DiagramElement, ICompositionModel
and its nodes get CloneAsync and no longer implement ICloneable; Clone is an
obsolete blocking wrapper. A strategy copy keeps every security and portfolio
parameter the original holds. Messages, FieldMapping, BankDetails and
WithdrawInfo are copied in memory. A CommissionRuleMessage shares its rule and
the emulator takes a copy of it. Envelope gets a constructor that takes all
three lines and CreateAsync.

ToBruteForce and ToBruteForceRandom become ToBruteForceAsync and
ToBruteForceRandomAsync and return IAsyncEnumerable; BruteForceOptimizer runs
over it and takes the next strategy through an asynchronous delegate.

Diagram elements keep their own state in SaveState, OnLoading and LoadState.
Undo restores an in-memory snapshot; a chart element holds its series and
axes in it by reference. An alert rule keeps its value in the form a message
carries it. A diagram strategy applies composition settings that were loaded
before the composition was set in SetCompositionAsync or at the start, and
saves them while they wait.

Strategies get an OnStartedAsync hook; diagram strategies resolve securities,
underlyings and strikes before the start so value processing never looks up
instruments. Paths.Serialize, SerializeInvariant, AppStartSettings.TrySave,
ICredentialsProvider.Save, ISnapshotSerializer.Serialize and the composition
registry gain async forms.

ICredentialsProvider.Delete becomes DeleteAsync, so loading, saving and
deleting the credentials wait for one another. Paths.InstalledVersion and
AppNameWithVersion are obsolete in favour of GetInstalledVersionAsync and
GetAppNameWithVersionAsync.

A file is opened for writing only after the last cancellation check, because
opening it empties it; a cancelled read reports the cancellation instead of
an empty result. A snapshot flush that failed leaves what it took due for the
next one.

The indicator templates for C#, F# and Python override LoadAsync and
SaveAsync.
2026-10-04 11:28:17 +03:00
mika@stocksharp.com fa4aeddb28 Fix adapter routing and subscription lifecycles 2026-09-14 18:22:23 +03:00
mika@stocksharp.com 3ce575b384 Let an execution say it states no side
Sides.Buy is the enum's default, so every ExecutionMessage that never touched
Side read back as a buy. Nothing said so and nothing could tell the difference,
which is how a rejected sell went out as FIX tag 54=1: the writer emits the tag
unconditionally and had no value meaning "unstated".

Side is now Sides?, and so is IOrderMessage.Side - an order always has one, a
message reporting on an order need not.

Callers split three ways. Where the message is the only source of truth for an
order - materializing one to send to a venue, building one the receiver has not
seen, signing a fill, booking a row into a side of the book - a missing side is
refused rather than defaulted. Where the side is merely descriptive, the absence
travels. Where it was silently invented, it is now stated: the matching engine
and both emulators left it off sixteen order reports, every one of which the
receiver read as a buy.

Storage keeps its layout. The snapshot record is positional and read without
version branching, so the absence rides in the byte the side already occupies -
Sides has two values and the byte has 254 spare. The transaction stream carries
one bit that cannot express absence, so Version72 writes the nullable form while
older files keep being read through the old branch. The order log throws instead:
a row entering or leaving the book always has a side, and a lifted comparison
would have written Sell for one that did not.

FIX omits tag 54 when the side is unstated. A required tag that is absent is
loud; a required tag that is wrong is not.
2026-08-15 21:14:39 +03:00
mika@stocksharp.com caa5400bb1 Fix late SecurityAll subscribers not receiving cached order books.
SubscriptionSecurityAllMessageAdapter now caches latest data per SecurityId
and replays snapshots to late child subscribers. Also emits SubscriptionOnline
for late children so SnapshotHolderMessageAdapter can trigger snapshot delivery.
EntityCache.GetSnapshot extended with MarketDepth support.
2026-02-20 15:57:38 +03:00
mikasoukhov d20f878153 ExecMsg. MarketPrice property. 2026-01-27 13:30:51 +03:00
mikasoukhov de45ac81c0 EntityCache. Validate negative and zero prices and volumes. 2025-12-31 19:53:44 +03:00
mikasoukhov ea8b819106 EntityCache fix order state update. 2025-12-31 13:27:23 +03:00
mikasoukhov 1391f6e37f EntityCache cleanup fix. 2025-12-31 11:50:26 +03:00
mikasoukhov beecb08296 Small fixes. 2025-12-31 11:49:10 +03:00
mikasoukhov 94ea14fc95 make EntityCache public with XML documentation 2025-12-27 23:59:14 +03:00
mikasoukhov e44b0c4825 Lock usage. 2025-11-30 12:32:50 +03:00
mikasoukhov 25e621a4cf DateTimeOffset -> DateTime UTC 2025-11-02 18:40:36 +03:00
mikasoukhov 5b2aa6792a IMarketDataProvider. SessionStateChanged, LookupBoardsResult, LookupTimeFramesResult removed as obsolete. 2025-10-07 22:32:53 +03:00
mikasoukhov 5ca1bcbe14 MyTrade. Trade is ITickTradeMessage 2025-10-07 11:46:37 +03:00
mikasoukhov 1aab5e3435 OrderFail. TransactionId property. 2025-03-15 13:27:21 +03:00
mikasoukhov 3f582b1330 Code cleanup. 2025-03-08 12:11:28 +03:00
mikasoukhov ec53696a8d Code cleanup. 2025-02-13 12:20:13 +03:00
mikasoukhov 6a95122ae9 ILogReceiver. LogDebug, LogError, LogInfo, LogWarning, LogVerbose methods. 2025-01-22 18:01:19 +03:00
mikasoukhov fa62cdbd88 EntityCache. Cross-thread issue fix. 2024-10-29 19:00:25 +03:00
mikasoukhov ce41a53cee Code cleanup. 2024-10-28 23:55:09 +03:00
mikasoukhov 61a10201c9 Code cleanup. 2024-10-21 18:38:14 +03:00
mikasoukhov bc0487cb13 Small changes. 2024-10-09 16:18:36 +03:00
mikasoukhov 6b3165ad96 Code cleanup 2024-08-19 00:08:27 +03:00
mikasoukhov ba6cc8ff31 Code cleanup 2024-08-18 22:42:54 +03:00
mikasoukhov 8a5afd5444 Code cleanup 2024-08-18 22:03:05 +03:00
mikasoukhov 15cbaafb8d Order. Calc AveragePrice 2024-04-21 12:13:34 +03:00
mikasoukhov ddaceb6fa2 Fix commit ff52db8c18 2024-04-21 11:49:53 +03:00
mikasoukhov ee72a6454b Code cleanup. 2024-04-21 11:45:45 +03:00
mikasoukhov ff52db8c18 Order. CancelledTime, MatchedTime added. 2024-04-20 22:12:31 +03:00
mikasoukhov 5b669ccd66 MarginModes enum. 2024-04-20 19:33:18 +03:00
mikasoukhov c5e5651760 Loc fixes 2023-11-20 12:14:53 +03:00
mikasoukhov d268e37d34 Trade, OrderLogItem, MarketDepth marked as obsolete. 2023-06-17 01:12:19 +03:00
mikasoukhov be2445c65d IEntityFactory is obsolete. 2023-06-16 17:52:02 +03:00
mikasoukhov e8eb817f7b Connector. Removed tick and depth caching. Entities created on demand. 2023-06-16 17:33:36 +03:00
mikasoukhov 7cbd9d7da9 Order. Side, LastChangeTime marked as obsolete.
Trade. Time, OrderDirection marked as obsolete.
2023-06-15 18:25:28 +03:00
mikasoukhov 69e45bc2f3 IExtendableEntity removed. 2023-03-01 20:51:08 +03:00
mikasoukhov c229154a02 MemoryStatistics removed. 2023-02-14 18:09:15 +03:00
mikasoukhov 1d43a9c515 MoreLinq removed. 2022-11-29 11:21:46 +03:00
mikasoukhov 94e837ca86 Code cleanup. 2021-09-13 21:11:54 +03:00
mikasoukhov ba52c763a3 Code cleanup. 2021-09-09 19:17:10 +03:00
mikasoukhov f319e9ccd9 CompareIgnoreCase -> EqualsIgnoreCase 2021-08-31 01:14:38 +03:00
StockSharp Dev1 7a82ff341b Fix commit 33ca249f6e 2021-01-18 22:22:50 +03:00
Sergey Sokolov 33ca249f6e .net standard 2.0 2021-01-18 20:29:06 +03:00
StockSharp Dev1 fdb6e25524 Code refactoring. 2020-09-03 11:34:36 +03:00
StockSharp Dev1 2508e311de Connector. Init snapshots for level1 and market depth. Fix https://stocksharp.ru/posts/m/51324/ 2020-09-03 11:02:37 +03:00
StockSharp Dev1 698f4315d5 TryGet, TryGetDecimal extensions. 2020-08-16 22:06:04 +07:00
StockSharp Dev1 16fa755ade Trade, MarketDepth, Candle, OrderFail, News. SeqNum property. 2020-08-03 23:52:44 +07:00
StockSharp Dev1 b4f9bf3a77 MyTrade. SeqNum property. 2020-07-25 19:21:48 +07:00
StockSharp Dev1 da123ba0e2 Fix commit 306e7acbae 2020-07-24 20:01:22 +07:00