mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-25 05:48:06 +00:00
feat(validation): add input validation for Bilateral and Blma constructors; enhance Butter and Mgdi calculations with NaN handling
This commit is contained in:
@@ -551,6 +551,17 @@ public class EmaTests
|
||||
Assert.Equal(verifyEma.Last.Value, ema.Last.Value, 1e-10);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Prime_AllNaNs_ReturnsNaN()
|
||||
{
|
||||
var ema = new Ema(5);
|
||||
double[] history = [double.NaN, double.NaN, double.NaN];
|
||||
|
||||
ema.Prime(history);
|
||||
|
||||
Assert.True(double.IsNaN(ema.Last.Value));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Calculate_ReturnsCorrectResultsAndHotIndicator()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user