This commit is contained in:
Miha Kralj
2023-01-05 16:40:08 -08:00
parent bfcbf8d686
commit 7a0279b3d5
10 changed files with 273 additions and 183 deletions
+12 -1
View File
@@ -114,7 +114,18 @@ public class Update {
Assert.Equal(lastLen, QL.Count); // same size
Assert.Equal(lastCalc, QL.Last()); // same data
}
[Fact] public void DEMA() {
[Fact]
public void DECAY() {
DECAY_Series QL = new(source: bars.Close, period: period);
var lastData = bars.Close.Last();
var lastCalc = QL.Last();
int lastLen = QL.Count;
QL.Add((DateTime.Today, 0), update: true);
QL.Add(lastData, update: true);
Assert.Equal(lastLen, QL.Count); // same size
Assert.Equal(lastCalc, QL.Last()); // same data
}
[Fact] public void DEMA() {
DEMA_Series QL = new(source: bars.Close, period: period);
var lastData = bars.Close.Last();
var lastCalc = QL.Last();