VAR test fix

This commit is contained in:
Miha Kralj
2022-11-15 22:13:35 -08:00
parent 3fe639e491
commit ca56f2d951
+1 -1
View File
@@ -118,7 +118,7 @@ public class TA_LIB
VAR_Series QL = new(bars.Close, period, false); VAR_Series QL = new(bars.Close, period, false);
Core.Var(inclose, 0, bars.Count - 1, TALIB, out int outBegIdx, out _, period); Core.Var(inclose, 0, bars.Count - 1, TALIB, out int outBegIdx, out _, period);
Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 5, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 5)); Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 4, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 4));
} }
[Fact] [Fact]