Implement Series-style batch indicators with mathematical precision. Use for new StaticSeries implementations or optimization. Series results are the canonical reference—all other styles must match exactly. Focus on cross-cutting requirements and performance optimization decisions.
All files live in src/{category}/{Indicator}/:
| File | Purpose |
|---|---|
{Indicator}.StaticSeries.cs | Static partial class — To{Indicator}() + To{Indicator}List() entry points |
{Indicator}.StreamHub.cs | Hub class (internal ctor) + To{Indicator}Hub() extension |
{Indicator}.BufferList.cs | List class + To{Indicator}List() extension |
{Indicator}.Catalog.cs | CommonListing, SeriesListing, StreamListing, BufferListing |
{Indicator}.Models.cs | Result record(s) |
{Indicator}.Utilities.cs |
Validate() (internal), Increment() (public), RemoveWarmupPeriods() |
I{Indicator}.cs | Parameter interface (parameter properties only; NOT result properties) |
Test files mirror in tests/indicators/{category}/{Indicator}/:
{Indicator}.StaticSeries.Tests.cs{Indicator}.BufferList.Tests.cs{Indicator}.StreamHub.Tests.cs{Indicator}.Regression.Tests.csCategory folders: a-d, e-k, m-r, s-z (alphabetical)
Array allocation pattern (use for predictable result counts; benchmark first):
TResult[] results = new TResult[length];
// ... assign results[i] = new TResult(...);
return new List<TResult>(results); // NOT results.ToList()
Some indicators (e.g., ADL) are faster with List.Add() — benchmark both.
Beyond the .StaticSeries.cs file, ensure:
src/**/{Indicator}.Catalog.cs and register in Catalog.Listings.cssrc/**/{Indicator}/I{Indicator}.cs with parameter properties (NOT result properties)tests/indicators/**/{Indicator}.StaticSeries.Tests.cs
StaticSeriesTestBase[TestCategory("Regression")] for baseline validationtools/performance/Perf.Series.csdocs/indicators/{Indicator}.mdtests/indicators/**/{Indicator}.Regression.Tests.csdocs/migration.md for notable and breaking changes from v2{Indicator}.Data.cs at maximum precisionsrc/s-z/Sma/Sma.StaticSeries.cssrc/e-k/Ema/Ema.StaticSeries.cssrc/a-d/Adx/Adx.StaticSeries.cssrc/a-d/Alligator/Alligator.StaticSeries.csSee references/decision-tree.md for result interface selection.