mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 19:18:05 +00:00
TR and ATR
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user