Refactor EMA, SMA, and WMA indicators to improve warmup tracking and coverage calculations; enhance tests for IsHot behavior and period dependency; update project files for better structure and maintainability.

This commit is contained in:
Miha Kralj
2025-12-03 13:49:45 -08:00
parent 4a0a8d6da2
commit 4a0435c217
7 changed files with 104 additions and 25 deletions
+3 -1
View File
@@ -8,7 +8,7 @@ namespace QuanTAlib;
/// Stateless design - only maintains minimal state needed for price continuity.
/// </summary>
[SkipLocalsInit]
#pragma warning disable S101 // Types should be named in PascalCase - GBM is a standard acronym
// Types should be named in PascalCase - GBM is a standard acronym
public class GBM : IFeed
#pragma warning restore S101
{
@@ -190,9 +190,11 @@ public class GBM : IFeed
double open = currentPrice;
double close = price;
#pragma warning disable S2245 // Random is acceptable for simulation/testing purposes
double rnd1 = _rnd.NextDouble();
double rnd2 = _rnd.NextDouble();
double rnd3 = _rnd.NextDouble();
#pragma warning restore S2245
t[i] = currentTime;
o[i] = open;