Fibonacci Moving Average

This commit is contained in:
Miha Kralj
2023-01-04 13:51:57 -08:00
parent fc474f19ee
commit ca54856a66
10 changed files with 133 additions and 25 deletions
+12 -1
View File
@@ -155,7 +155,18 @@ public class Update {
Assert.Equal(lastLen, QL.Count); // same size
Assert.Equal(lastCalc, QL.Last()); // same data
}
[Fact] public void HEMA() {
[Fact]
public void FMA() {
FMA_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 HEMA() {
HEMA_Series QL = new(source: bars.Close, period: period);
var lastData = bars.Close.Last();
var lastCalc = QL.Last();