3.0.0-preview.2
Pre-releaseWe’ve released a new preview release for v3 of the Stock Indicators for .NET NuGet package, containing widely implemented streaming style indicators.
See Skender.Stock.Indicators @ NuGet.org for more information.
Warning
Preview releases are experimental and volatile with breaking changes and conventions.
Note
There will be a series of preview releases that implement streaming use cases. We expect possibly 1-2 additional preview pre-releases before we make an official stable v3 package.
- see #1014 for overall v3 progress
What's Changed
- wide implementation of buffer list incrementing indicators, and streaming hubs
Full Changelog: 3.0.0-preview.1...3.0.0-preview.2
Feedback appreciated in discussion #1018
Incrementally add data with buffer lists
For scenarios where quotes arrive one at a time, buffer lists provide efficient incremental processing without recalculating the entire history.
// create list
SmaList<SmaResult> smaList = new(lookbackPeriods: 20);
// add new quotes incrementally
smaList.Add(newQuote);Buffer lists maintain internal state and automatically manage the warmup period, making them ideal for basic live data feeds and incremental updates.
Streaming hubs with observer patterns
Hubs provides a reactive, subscription-based pattern for streaming market data with automatic cascading calculations for advances scenarios.
// create provider with chain of indicators
QuoteHub provider = new QuoteHub();
SmaHub smaHub = provider.ToSmaHub(20);
RsiHub rsiHub = smaHub.ToRsiHub(14); // RSI of SMA
// publish quotes - observers auto-update in cascade
provider.Add(newQuote);
// consume downstream hubs indicators
IReadOnlyList<RsiResult> = rsiHub.Results;The observer cascade ensures that when a new quote arrives, all chained indicators update automatically in the correct sequence.