This commit is contained in:
Miha Kralj
2022-04-28 12:52:00 -07:00
parent e9d7ba8cf1
commit 50ae1d4917
11 changed files with 129 additions and 23 deletions
+8
View File
@@ -99,6 +99,14 @@ public class Skender_Stock
Assert.Equal(Math.Round((double)SK.Last().Atr!, 8), Math.Round(QL.Last().v, 8));
}
[Fact]
public void CCI()
{
CCI_Series QL = new(this.bars, this.period, false);
var SK = this.quotes.GetCci(this.period);
Assert.Equal(Math.Round((double)SK.Last().Cci!, 8), Math.Round(QL.Last().v, 8));
}
[Fact]
public void ATRP()
+9
View File
@@ -102,6 +102,15 @@ public class TA_LIB
Assert.Equal(Math.Round(this.TALIB[this.TALIB.Length - outBegIdx - 1], 8), Math.Round(QL.Last().v, 8));
}
[Fact]
public void CCI()
{
CCI_Series QL = new(this.bars, this.period, false);
Core.Cci(this.inhigh, this.inlow, this.inclose, 0, this.bars.Count - 1, this.TALIB, out int outBegIdx, out _, this.period);
Assert.Equal(Math.Round(this.TALIB[this.TALIB.Length - outBegIdx - 1], 8), Math.Round(QL.Last().v, 8));
}
[Fact]
public void RSI()
{