بنقرة واحدة
indicator-catalog
// Create and register indicator catalog entries for automation. Use for Catalog.cs files, CatalogListingBuilder patterns, parameter/result definitions, and PopulateCatalog registration.
// Create and register indicator catalog entries for automation. Use for Catalog.cs files, CatalogListingBuilder patterns, parameter/result definitions, and PopulateCatalog registration.
Implement StreamHub real-time indicators with O(1) performance. Use for ChainHub or QuoteProvider implementations. Covers provider selection, RollbackState patterns, performance anti-patterns, and comprehensive testing with StreamHubTestBase.
Format and validate Markdown files following GitHub Flavored Markdown standards with automated linting and manual semantic review
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.
Write and update the VitePress documentation website for stock indicators. Use when adding a new indicator page, updating an existing indicator page, or making structural changes to the docs site.
Quality gates checklist for completing code work before finishing implementation cycles
Implement BufferList incremental indicators with efficient state management. Use for IIncrementFromChain or IIncrementFromQuote implementations. Covers interface selection, constructor patterns, and BufferListTestBase testing requirements.
| name | indicator-catalog |
| description | Create and register indicator catalog entries for automation. Use for Catalog.cs files, CatalogListingBuilder patterns, parameter/result definitions, and PopulateCatalog registration. |
src/{category}/{Indicator}/{Indicator}.Catalog.cs
public static partial class Ema
{
/// <summary>
/// EMA Common Base Listing
/// </summary>
internal static readonly IndicatorListing CommonListing =
new CatalogListingBuilder()
.WithName("Exponential Moving Average")
.WithId("EMA")
.WithCategory(Category.MovingAverage)
.AddParameter<int>("lookbackPeriods", "Lookback Period",
description: "Number of periods for the EMA calculation",
isRequired: true, defaultValue: 20, minimum: 2, maximum: 250)
.AddResult("Ema", "EMA", ResultType.Default, isReusable: true)
.Build();
/// <summary>
/// EMA Series Listing
/// </summary>
internal static readonly IndicatorListing SeriesListing =
new CatalogListingBuilder(CommonListing)
.WithStyle(Style.Series)
.WithMethodName("ToEma")
.Build();
/// <summary>
/// EMA Stream Listing
/// </summary>
internal static readonly IndicatorListing StreamListing =
new CatalogListingBuilder(CommonListing)
.WithStyle(Style.Stream)
.WithMethodName("ToEmaHub")
.Build();
/// <summary>
/// EMA Buffer Listing
/// </summary>
internal static readonly IndicatorListing BufferListing =
new CatalogListingBuilder(CommonListing)
.WithStyle(Style.Buffer)
.WithMethodName("ToEmaList")
.Build();
}
| Style | Pattern | Example |
|---|---|---|
| Series | To{Name} | ToEma |
| Stream | To{Name}Hub | ToEmaHub |
| Buffer | To{Name}List | ToEmaList |
.WithMethodName() must be in style-specific listings, NOT in CommonListing.
AddParameter<T>() — primitive value types (typically int or double)AddEnumParameter<T>() — enum typesAddDateParameter() — DateTimeAddSeriesParameter() — IReadOnlyList<T> where T : IReusableminimum and maximum required for all numeric parametersdataName must match property name in Models file exactlyisReusable: true only for the property mapping to IReusable.ValueISeries models: all results must have isReusable: falseisReusable: true per IReusable indicator| Category | Examples |
|---|---|
CandlestickPattern | Doji, Marubozu |
MovingAverage | EMA, SMA, HMA, TEMA, WMA, DEMA |
Oscillator | RSI, Stochastic, MACD, CCI, BOP, CMO, Chop, DPO |
PriceChannel | Bollinger Bands, Keltner, Donchian, VWAP |
PriceCharacteristic | ATR, Beta, Standard Deviation, True Range |
PricePattern | Fractal, Pivot Points |
PriceTransform | Quote Part, ZigZag |
PriceTrend | ADX, Aroon, Alligator, AtrStop, SuperTrend, Vortex |
StopAndReverse | Chandelier, Parabolic SAR, Volatility Stop |
VolumeBased | OBV, Chaikin Money Flow, Chaikin Oscillator |
Add entries inside the host repository's catalog populator method. The backing collection is a private static readonly List<IndicatorListing> declared at the top of the catalog file; the host repository determines its field name (shown below as listings).
Indicators are grouped alphabetically by indicator ID (abbreviation) and separated by a blank line. Each block is preceded by a short comment header — // {Abbreviation} ({Full Name}) when an abbreviation is conventional, otherwise just // {Full Name}. Within a block, the preferred order for the style listings is Buffer → Series → Stream:
// EMA (Exponential Moving Average)
listings.Add(Ema.BufferListing);
listings.Add(Ema.SeriesListing);
listings.Add(Ema.StreamListing);
// HMA (Hull Moving Average)
listings.Add(Hma.BufferListing);
listings.Add(Hma.SeriesListing);
listings.Add(Hma.StreamListing);
Series-only indicators (no streamable variant) register a single SeriesListing line in the same alphabetical position; e.g.:
// Beta
listings.Add(Beta.SeriesListing);
.WithMethodName() in CommonListingisReusable: true for ISeries modelsisReusable: true results per indicatortests/indicators/{folder}/{Indicator}/{Indicator}.Catalog.Tests.cs:
[TestClass]
public class EmaCatalogTests : TestBase
{
[TestMethod]
public void EmaSeriesListing()
{
var listing = Ema.SeriesListing;
listing.Name.Should().Be("Exponential Moving Average");
listing.Style.Should().Be(Style.Series);
listing.MethodName.Should().Be("ToEma");
}
}