TR and ATR

This commit is contained in:
Miha
2022-04-19 22:34:42 -07:00
parent 50ed6f6504
commit 509b6dec02
41 changed files with 488 additions and 236 deletions
+18
View File
@@ -90,4 +90,22 @@ public class Skender_Stock
Assert.Equal(Math.Round((double)SK.Last().Mape!, 8), Math.Round(QL.Last().v, 8));
}
[Fact]
public void ATR()
{
ATR_Series QL = new(this.bars, this.period, false);
var SK = this.quotes.GetAtr(this.period);
Assert.Equal(Math.Round((double)SK.Last().Atr!, 8), Math.Round(QL.Last().v, 8));
}
[Fact]
public void ATRP()
{
ATRP_Series QL = new(this.bars, this.period, false);
var SK = this.quotes.GetAtr(this.period);
Assert.Equal(Math.Round((double)SK.Last().Atrp!, 8), Math.Round(QL.Last().v, 8));
}
}