tests and cleanup

This commit is contained in:
Miha Kralj
2024-10-11 18:02:09 -07:00
parent 839313c9f2
commit cc45cebeb4
96 changed files with 3640 additions and 327 deletions
-20
View File
@@ -109,26 +109,6 @@ public class TAlibTests
}
}
[Fact]
public void WMA()
{
for (int run = 0; run < iterations; run++)
{
int period = GetRandomNumber(5, 55);
Wma ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
{ QL.Add(ma.Calc(new TValue(item.Time, item.Close))); }
Core.Wma(data, 0, QL.Length - 1, TALIB, out int outBegIdx, out _, period);
Assert.Equal(QL.Length, TALIB.Count());
for (int i = QL.Length - 1; i > 2000; i--)
{
Assert.InRange(TALIB[i - outBegIdx] - QL[i].Value, -range, range);
}
}
}
[Fact]
public void T3()
{