This commit is contained in:
Miha Kralj
2022-12-27 12:28:53 -08:00
parent 509bf244d9
commit 83e5d89cbb
12 changed files with 110 additions and 14 deletions
+12 -1
View File
@@ -165,7 +165,18 @@ public class PandasTA : IDisposable
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
}
[Fact] void HWMA() {
HWMA_Series QL = new(bars.Close, useNaN: false);
var pta = df.ta.hwma(close: df.close);
for (int i = QL.Length; i > QL.Length-sample; i--)
{
double QL_item = QL[i - 1].v;
double PanTA_item = (double)pta[i - 1];
Assert.InRange(PanTA_item! - QL_item, -Math.Exp(-digits), Math.Exp(-digits));
}
}
[Fact] void KAMA() {
KAMA_Series QL = new(bars.Close, period);
var pta = df.ta.kama(close: df.close, length: period);