mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-25 13:58:04 +00:00
tests update
This commit is contained in:
@@ -214,7 +214,7 @@ public class TA_LIB
|
|||||||
[Fact]
|
[Fact]
|
||||||
public void ADOSC()
|
public void ADOSC()
|
||||||
{
|
{
|
||||||
ADOSC_Series QL = new(bars, false);
|
ADOSC_Series QL = new(bars );
|
||||||
Core.AdOsc(inhigh, inlow, inclose, involume, 0, bars.Count - 1, TALIB, out int outBegIdx, out _);
|
Core.AdOsc(inhigh, inlow, inclose, involume, 0, bars.Count - 1, TALIB, out int outBegIdx, out _);
|
||||||
|
|
||||||
Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 6, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 6, MidpointRounding.AwayFromZero));
|
Assert.Equal(Math.Round(TALIB[TALIB.Length - outBegIdx - 1], 6, MidpointRounding.AwayFromZero), Math.Round(QL.Last().v, 6, MidpointRounding.AwayFromZero));
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ public class Skender
|
|||||||
{
|
{
|
||||||
WMA_Series QL = new(bars.Close, period, false);
|
WMA_Series QL = new(bars.Close, period, false);
|
||||||
var SK = quotes.GetWma(period).Select(i => i.Wma.Null2NaN()!);
|
var SK = quotes.GetWma(period).Select(i => i.Wma.Null2NaN()!);
|
||||||
for (int i = QL.Length; i > skip; i--)
|
for (int i = QL.Length; i > skip*2; i--)
|
||||||
{
|
{
|
||||||
double QL_item = Math.Round(QL[i - 1].v, digits: digits);
|
double QL_item = Math.Round(QL[i - 1].v, digits: digits);
|
||||||
double SK_item = Math.Round(SK.ElementAt(i - 1), digits: digits);
|
double SK_item = Math.Round(SK.ElementAt(i - 1), digits: digits);
|
||||||
|
|||||||
Reference in New Issue
Block a user