From 70c6d6087a87e90597cac02012e9a3e27104f8f1 Mon Sep 17 00:00:00 2001 From: Dave Skender <8432125+DaveSkender@users.noreply.github.com> Date: Sun, 13 Oct 2024 22:35:27 -0400 Subject: [PATCH] convert to naming for static series --- src/_common/ObsoleteV3.cs | 8 +- src/a-d/Adl/Adl.Api.cs | 19 -- src/a-d/Adl/Adl.StaticSeries.cs | 6 +- src/a-d/Adx/Adx.Api.cs | 4 +- src/a-d/Adx/Adx.Common.cs | 18 -- src/a-d/Adx/Adx.StaticSeries.cs | 2 +- src/a-d/Adx/Adx.Utilities.cs | 14 +- src/a-d/Alligator/Alligator.Api.cs | 2 +- src/a-d/Alma/Alma.Api.cs | 2 +- src/a-d/Aroon/Aroon.Api.cs | 4 +- src/a-d/Aroon/Aroon.Common.cs | 19 -- src/a-d/Aroon/Aroon.StaticSeries.cs | 4 +- src/a-d/Aroon/Aroon.Utilities.cs | 14 +- src/a-d/Atr/Atr.Api.cs | 2 +- src/a-d/AtrStop/AtrStop.Api.cs | 2 +- src/a-d/Awesome/Awesome.Api.cs | 4 +- src/a-d/Awesome/Awesome.Common.cs | 26 --- src/a-d/Awesome/Awesome.StaticSeries.cs | 2 +- src/a-d/Awesome/Awesome.Utilities.cs | 21 ++- src/a-d/Beta/Beta.Api.cs | 4 +- src/a-d/Beta/Beta.Common.cs | 30 --- src/a-d/Beta/Beta.StaticSeries.cs | 4 +- src/a-d/Beta/Beta.Utilities.cs | 25 ++- src/a-d/BollingerBands/BollingerBands.Api.cs | 2 +- src/a-d/Bop/Bop.Api.cs | 2 +- src/a-d/Cci/Cci.Api.cs | 2 +- src/a-d/ChaikinOsc/ChaikinOsc.Api.cs | 2 +- src/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.cs | 2 +- src/a-d/Chandelier/Chandelier.Api.cs | 2 +- src/a-d/Chop/Chop.Api.cs | 2 +- src/a-d/Cmf/Cmf.Api.cs | 2 +- src/a-d/Cmf/Cmf.StaticSeries.cs | 2 +- src/a-d/Cmo/Cmo.Api.cs | 2 +- src/a-d/ConnorsRsi/ConnorsRsi.Api.cs | 2 +- src/a-d/Correlation/Correlation.Api.cs | 4 +- src/a-d/Correlation/Correlation.Common.cs | 30 --- .../Correlation/Correlation.StaticSeries.cs | 4 +- src/a-d/Correlation/Correlation.Utilities.cs | 25 ++- src/a-d/Dema/Dema.Api.cs | 2 +- src/a-d/Doji/Doji.Api.cs | 2 +- src/a-d/Donchian/Donchian.Api.cs | 2 +- src/a-d/Dpo/Dpo.Api.cs | 2 +- src/a-d/Dynamic/Dynamic.Api.cs | 2 +- src/e-k/ElderRay/ElderRay.Api.cs | 2 +- src/e-k/Epma/Epma.Api.cs | 2 +- src/e-k/Fcb/Fcb.Api.cs | 2 +- .../FisherTransform/FisherTransform.Api.cs | 2 +- src/e-k/ForceIndex/ForceIndex.Api.cs | 2 +- src/e-k/Fractal/Fractal.Api.cs | 2 +- src/e-k/Gator/Gator.Api.cs | 4 +- src/e-k/HeikinAshi/HeikinAshi.Api.cs | 2 +- src/e-k/Hma/Hma.Api.cs | 2 +- src/e-k/HtTrendline/HtTrendline.Api.cs | 2 +- src/e-k/Hurst/Hurst.Api.cs | 2 +- src/e-k/Ichimoku/Ichimoku.Api.cs | 2 +- src/e-k/Kama/Kama.Api.cs | 2 +- src/e-k/Keltner/Keltner.Api.cs | 2 +- src/e-k/Kvo/Kvo.Api.cs | 2 +- src/m-r/MaEnvelopes/MaEnvelopes.Api.cs | 2 +- src/m-r/Macd/MacdApi.cs | 2 +- src/m-r/Mama/Mama.Api.cs | 2 +- src/m-r/Marubozu/Marubozu.Api.cs | 2 +- src/m-r/Mfi/Mfi.Api.cs | 2 +- src/m-r/Obv/Obv.Api.cs | 2 +- src/m-r/ParabolicSar/ParabolicSar.Api.cs | 2 +- src/m-r/PivotPoints/PivotPoints.Api.cs | 2 +- src/m-r/Pivots/Pivots.Api.cs | 2 +- src/m-r/Pmo/Pmo.Api.cs | 2 +- src/m-r/Prs/Prs.Api.cs | 2 +- src/m-r/Pvo/Pvo.Api.cs | 2 +- src/m-r/Renko/Renko.Api.cs | 2 +- src/m-r/Roc/Roc.Api.cs | 2 +- src/m-r/RocWb/RocWb.Api.cs | 2 +- src/m-r/RollingPivots/RollingPivots.Api.cs | 2 +- src/m-r/Rsi/Rsi.Api.cs | 2 +- src/s-z/Slope/Slope.Api.cs | 2 +- src/s-z/SmaAnalysis/SmaAnalysis.Api.cs | 2 +- src/s-z/Smi/Smi.Api.cs | 2 +- src/s-z/Smma/Smma.Api.cs | 2 +- src/s-z/StarcBands/StarcBands.Api.cs | 2 +- src/s-z/Stc/Stc.Api.cs | 2 +- src/s-z/StdDev/StdDev.Api.cs | 2 +- src/s-z/StdDevChannels/StdDevChannels.Api.cs | 2 +- src/s-z/Stoch/Stoch.Api.cs | 4 +- src/s-z/StochRsi/StochRsi.Api.cs | 2 +- src/s-z/SuperTrend/SuperTrend.Api.cs | 2 +- src/s-z/T3/T3.Api.cs | 2 +- src/s-z/Tema/Tema.Api.cs | 2 +- src/s-z/Tr/Tr.Api.cs | 2 +- src/s-z/Trix/Trix.Api.cs | 2 +- src/s-z/Tsi/Tsi.Api.cs | 2 +- src/s-z/UlcerIndex/UlcerIndex.Api.cs | 2 +- src/s-z/Ultimate/Ultimate.Api.cs | 2 +- src/s-z/VolatilityStop/VolatilityStop.Api.cs | 2 +- src/s-z/Vortex/Vortex.Api.cs | 2 +- src/s-z/Vwap/Vwap.Api.cs | 2 +- src/s-z/Vwma/Vwma.Api.cs | 2 +- src/s-z/WilliamsR/WilliamsR.Api.cs | 2 +- src/s-z/Wma/Wma.Api.cs | 2 +- src/s-z/ZigZag/ZigZag.Api.cs | 2 +- .../_common/Generics/RemoveWarmup.Tests.cs | 6 +- .../Reusable/Reusable.Utilities.Tests.cs | 2 +- .../a-d/Adl/Adl.StaticSeries.Tests.cs | 14 +- .../indicators/a-d/Adl/Adl.StreamHub.Tests.cs | 4 +- .../a-d/Adx/Adx.StaticSeries.Tests.cs | 20 +- .../Alligator/Alligator.StaticSeries.Tests.cs | 30 +-- .../Alligator/Alligator.StreamHub.Tests.cs | 4 +- .../a-d/Alma/Alma.StaticSeries.Tests.cs | 26 +-- .../a-d/Aroon/Aroon.StaticSeries.Tests.cs | 14 +- .../a-d/Atr/Atr.StaticSeries.Tests.cs | 18 +- .../indicators/a-d/Atr/Atr.StreamHub.Tests.cs | 4 +- .../a-d/AtrStop/AtrStop.StaticSeries.Tests.cs | 18 +- .../a-d/AtrStop/AtrStop.StreamHub.Tests.cs | 4 +- .../a-d/Awesome/Awesome.StaticSeries.Tests.cs | 20 +- .../a-d/Beta/Beta.StaticSeries.Tests.cs | 38 ++-- .../BollingerBands.StaticSeries.Tests.cs | 20 +- .../a-d/Bop/Bop.StaticSeries.Tests.cs | 16 +- .../a-d/Cci/Cci.StaticSeries.Tests.cs | 14 +- .../ChaikinOsc.StaticSeries.Tests.cs | 16 +- .../Chandelier.StaticSeries.Tests.cs | 20 +- .../a-d/Chop/Chop.StaticSeries.Tests.cs | 16 +- .../a-d/Cmf/Cmf.StaticSeries.Tests.cs | 16 +- .../a-d/Cmo/Cmo.StaticSeries.Tests.cs | 18 +- .../ConnorsRsi.StaticSeries.Tests.cs | 24 +-- .../Correlation.StaticSeries.Tests.cs | 24 +-- .../a-d/Dema/Dema.StaticSeries.Tests.cs | 18 +- .../a-d/Doji/Doji.StaticSeries.Tests.cs | 14 +- .../Donchian/Donchian.StaticSeries.Tests.cs | 14 +- .../a-d/Dpo/Dpo.StaticSeries.Tests.cs | 16 +- .../a-d/Dynamic/Dynamic.StaticSeries.Tests.cs | 18 +- .../ElderRay/ElderRay.StaticSeries.Tests.cs | 14 +- .../e-k/Ema/Ema.StaticSeries.Tests.cs | 2 +- .../e-k/Epma/Epma.StaticSeries.Tests.cs | 18 +- .../e-k/Fcb/Fcb.StaticSeries.Tests.cs | 14 +- .../FisherTransform.StaticSeries.Tests.cs | 16 +- .../ForceIndex.StaticSeries.Tests.cs | 14 +- .../e-k/Fractal/Fractal.StaticSeries.Tests.cs | 12 +- .../e-k/Gator/Gator.StaticSeries.Tests.cs | 18 +- .../HeikinAshi.StaticSeries.Tests.cs | 10 +- .../e-k/Hma/Hma.StaticSeries.Tests.cs | 18 +- .../HtTrendline.StaticSeries.Tests.cs | 18 +- .../e-k/Hurst/Hurst.StaticSeries.Tests.cs | 18 +- .../Ichimoku/Ichimoku.StaticSeries.Tests.cs | 16 +- .../e-k/Kama/Kama.StaticSeries.Tests.cs | 22 +-- .../e-k/Keltner/Keltner.StaticSeries.Tests.cs | 18 +- .../e-k/Kvo/Kvo.StaticSeries.Tests.cs | 18 +- .../MaEnvelopes.StaticSeries.Tests.cs | 48 ++--- .../m-r/Macd/Macd.StaticSeries.Tests.cs | 22 +-- .../m-r/Mama/Mama.StaticSeries.Tests.cs | 22 +-- .../Marubozu/Marubozu.StaticSeries.Tests.cs | 14 +- .../m-r/Mfi/Mfi.StaticSeries.Tests.cs | 16 +- .../m-r/Obv/Obv.StaticSeries.Tests.cs | 12 +- .../ParabolicSar.StaticSeries.Tests.cs | 18 +- .../PivotPoints.StaticSeries.Tests.cs | 22 +-- .../m-r/Pivots/Pivots.StaticSeries.Tests.cs | 16 +- .../m-r/Pmo/Pmo.StaticSeries.Tests.cs | 22 +-- .../m-r/Prs/Prs.StaticSeries.Tests.cs | 22 +-- .../m-r/Pvo/Pvo.StaticSeries.Tests.cs | 18 +- .../m-r/Renko/Renko.StaticSeries.Tests.cs | 14 +- .../m-r/Renko/Renko.StreamHub.Tests.cs | 4 +- .../m-r/Roc/Roc.StaticSeries.Tests.cs | 18 +- .../m-r/RocWb/RocWb.StaticSeries.Tests.cs | 22 +-- .../RollingPivots.StaticSeries.Tests.cs | 22 +-- .../m-r/Rsi/Rsi.StaticSeries.Tests.cs | 24 +-- .../s-z/Slope/Slope.StaticSeries.Tests.cs | 20 +- .../SmaAnalysis.StaticSeries.Tests.cs | 18 +- .../s-z/Smi/Smi.StaticSeries.Tests.cs | 24 +-- .../s-z/Smma/Smma.StaticSeries.Tests.cs | 18 +- .../StarcBands.StaticSeries.Tests.cs | 18 +- .../s-z/Stc/Stc.StaticSeries.Tests.cs | 24 +-- .../s-z/StdDev/StdDev.StaticSeries.Tests.cs | 20 +- .../StdDevChannels.StaticSeries.Tests.cs | 22 +-- .../s-z/Stoch/Stoch.StaticSeries.Tests.cs | 34 ++-- .../StochRsi/StochRsi.StaticSeries.Tests.cs | 26 +-- .../SuperTrend.StaticSeries.Tests.cs | 18 +- .../s-z/T3/T3.StaticSeries.Tests.cs | 18 +- .../s-z/Tema/Tema.StaticSeries.Tests.cs | 18 +- .../s-z/Tr/Tr.StaticSeries.Tests.cs | 14 +- tests/indicators/s-z/Tr/Tr.StreamHub.Tests.cs | 4 +- .../s-z/Trix/Trix.StaticSeries.Tests.cs | 18 +- .../s-z/Tsi/Tsi.StaticSeries.Tests.cs | 24 +-- .../UlcerIndex.StaticSeries.Tests.cs | 18 +- .../Ultimate/Ultimate.StaticSeries.Tests.cs | 18 +- .../VolatilityStop.StaticSeries.Tests.cs | 16 +- .../s-z/Vortex/Vortex.StaticSeries.Tests.cs | 14 +- .../s-z/Vwap/Vwap.StaticSeries.Tests.cs | 18 +- .../s-z/Vwma/Vwma.StaticSeries.Tests.cs | 14 +- .../WilliamsR/WilliamsR.StaticSeries.Tests.cs | 18 +- .../s-z/Wma/Wma.StaticSeries.Tests.cs | 22 +-- .../s-z/ZigZag/ZigZag.StaticSeries.Tests.cs | 28 +-- tests/other/Convergence.Tests.cs | 52 ++--- tests/other/PublicApi.Interface.Tests.cs | 10 +- tests/performance/Perf.StaticSeries.cs | 178 +++++++++--------- 193 files changed, 1115 insertions(+), 1166 deletions(-) delete mode 100644 src/a-d/Adx/Adx.Common.cs delete mode 100644 src/a-d/Aroon/Aroon.Common.cs delete mode 100644 src/a-d/Awesome/Awesome.Common.cs delete mode 100644 src/a-d/Beta/Beta.Common.cs delete mode 100644 src/a-d/Correlation/Correlation.Common.cs diff --git a/src/_common/ObsoleteV3.cs b/src/_common/ObsoleteV3.cs index a9f881db2..1f78baa0f 100644 --- a/src/_common/ObsoleteV3.cs +++ b/src/_common/ObsoleteV3.cs @@ -42,28 +42,28 @@ public static IEnumerable GetEma( public static IEnumerable GetAdl( this IEnumerable quotes, int smaPeriods) where TQuote : IQuote - => quotes.ToSortedList().CalcAdl(); + => quotes.ToSortedList().ToAdl(); [ExcludeFromCodeCoverage] [Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0 public static IEnumerable GetObv( this IEnumerable quotes, int smaPeriods) where TQuote : IQuote - => quotes.GetObv(); + => quotes.ToObv(); [ExcludeFromCodeCoverage] [Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0 public static IEnumerable GetPrs( this IEnumerable quotesEval, IEnumerable quotesBase, int lookbackPeriods, int smaPeriods) where TQuote : IQuote - => quotesEval.Use(CandlePart.Close).GetPrs(quotesBase.Use(CandlePart.Close), lookbackPeriods); + => quotesEval.Use(CandlePart.Close).ToPrs(quotesBase.Use(CandlePart.Close), lookbackPeriods); [ExcludeFromCodeCoverage] [Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0 public static IEnumerable GetRoc( this IEnumerable quotes, int lookbackPeriods, int smaPeriods) where TQuote : IQuote - => quotes.Use(CandlePart.Close).GetRoc(lookbackPeriods); + => quotes.Use(CandlePart.Close).ToRoc(lookbackPeriods); [ExcludeFromCodeCoverage] [Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0 diff --git a/src/a-d/Adl/Adl.Api.cs b/src/a-d/Adl/Adl.Api.cs index e7a08f051..cb02c9b8f 100644 --- a/src/a-d/Adl/Adl.Api.cs +++ b/src/a-d/Adl/Adl.Api.cs @@ -4,25 +4,6 @@ namespace Skender.Stock.Indicators; public static partial class Adl { - // SERIES, from TQuote - /// - ///Accumulation / Distribution Line(ADL) is a rolling accumulation of Chaikin Money Flow Volume. - /// - ///See - /// documentation - ///for more information. - /// - /// - /// Configurable Quote type. See Guide for more information. - ///Historical price quotes. - ///Time series of ADL values. - public static IReadOnlyList GetAdl( - this IEnumerable quotes) - where TQuote : IQuote - => quotes - .ToSortedList() - .CalcAdl(); - // OBSERVER, from Quote Provider public static AdlHub ToAdl( this IQuoteProvider quoteProvider) diff --git a/src/a-d/Adl/Adl.StaticSeries.cs b/src/a-d/Adl/Adl.StaticSeries.cs index 8b7c17cea..10f833ed4 100644 --- a/src/a-d/Adl/Adl.StaticSeries.cs +++ b/src/a-d/Adl/Adl.StaticSeries.cs @@ -4,10 +4,12 @@ namespace Skender.Stock.Indicators; public static partial class Adl { - internal static List CalcAdl( - this List source) + public static IReadOnlyList ToAdl( + this IReadOnlyList source) where TQuote : IQuote { + ArgumentNullException.ThrowIfNull(source); + // initialize int length = source.Count; List results = new(length); diff --git a/src/a-d/Adx/Adx.Api.cs b/src/a-d/Adx/Adx.Api.cs index c578dad40..7a60a587b 100644 --- a/src/a-d/Adx/Adx.Api.cs +++ b/src/a-d/Adx/Adx.Api.cs @@ -2,12 +2,12 @@ namespace Skender.Stock.Indicators; // AVERAGE DIRECTIONAL INDEX (API) -public static partial class Indicator +public static partial class Adx { // SERIES, from TQuote /// /// - public static IReadOnlyList GetAdx( + public static IReadOnlyList ToAdx( this IEnumerable quotes, int lookbackPeriods = 14) where TQuote : IQuote => quotes diff --git a/src/a-d/Adx/Adx.Common.cs b/src/a-d/Adx/Adx.Common.cs deleted file mode 100644 index deb21a614..000000000 --- a/src/a-d/Adx/Adx.Common.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace Skender.Stock.Indicators; - -// AVERAGE DIRECTIONAL INDEX (COMMON) - -public static class Adx -{ - // parameter validation - internal static void Validate( - int lookbackPeriods) - { - // check parameter arguments - if (lookbackPeriods <= 1) - { - throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, - "Lookback periods must be greater than 1 for ADX."); - } - } -} diff --git a/src/a-d/Adx/Adx.StaticSeries.cs b/src/a-d/Adx/Adx.StaticSeries.cs index 3996d71fa..7944d6bb1 100644 --- a/src/a-d/Adx/Adx.StaticSeries.cs +++ b/src/a-d/Adx/Adx.StaticSeries.cs @@ -2,7 +2,7 @@ namespace Skender.Stock.Indicators; // AVERAGE DIRECTIONAL INDEX (SERIES) -public static partial class Indicator +public static partial class Adx { private static List CalcAdx( this List source, diff --git a/src/a-d/Adx/Adx.Utilities.cs b/src/a-d/Adx/Adx.Utilities.cs index ff9a1d40f..f7e65d5f9 100644 --- a/src/a-d/Adx/Adx.Utilities.cs +++ b/src/a-d/Adx/Adx.Utilities.cs @@ -1,6 +1,6 @@ namespace Skender.Stock.Indicators; -public static partial class Indicator +public static partial class Adx { // remove recommended periods /// @@ -13,4 +13,16 @@ public static IReadOnlyList RemoveWarmupPeriods( return results.Remove(2 * n + 100); } + + // parameter validation + internal static void Validate( + int lookbackPeriods) + { + // check parameter arguments + if (lookbackPeriods <= 1) + { + throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, + "Lookback periods must be greater than 1 for ADX."); + } + } } diff --git a/src/a-d/Alligator/Alligator.Api.cs b/src/a-d/Alligator/Alligator.Api.cs index 6d0c047eb..06a613a74 100644 --- a/src/a-d/Alligator/Alligator.Api.cs +++ b/src/a-d/Alligator/Alligator.Api.cs @@ -29,7 +29,7 @@ public static partial class Alligator /// /// Invalid parameter value provided. /// - public static IReadOnlyList GetAlligator( + public static IReadOnlyList ToAlligator( this IEnumerable source, int jawPeriods = 13, int jawOffset = 8, diff --git a/src/a-d/Alma/Alma.Api.cs b/src/a-d/Alma/Alma.Api.cs index ffb1e3555..1eb838afd 100644 --- a/src/a-d/Alma/Alma.Api.cs +++ b/src/a-d/Alma/Alma.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetAlma( + public static IReadOnlyList ToAlma( this IReadOnlyList results, int lookbackPeriods = 9, double offset = 0.85, diff --git a/src/a-d/Aroon/Aroon.Api.cs b/src/a-d/Aroon/Aroon.Api.cs index 9abeee793..17a2fc1ab 100644 --- a/src/a-d/Aroon/Aroon.Api.cs +++ b/src/a-d/Aroon/Aroon.Api.cs @@ -1,12 +1,12 @@ namespace Skender.Stock.Indicators; // AROON OSCILLATOR (API) -public static partial class Indicator +public static partial class Aroon { // SERIES, from TQuote /// /// - public static IReadOnlyList GetAroon( + public static IReadOnlyList ToAroon( this IEnumerable quotes, int lookbackPeriods = 25) where TQuote : IQuote => quotes diff --git a/src/a-d/Aroon/Aroon.Common.cs b/src/a-d/Aroon/Aroon.Common.cs deleted file mode 100644 index 4c0c30bf8..000000000 --- a/src/a-d/Aroon/Aroon.Common.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Skender.Stock.Indicators; - -// AROON OSCILLATOR (COMMON) - -public static class Aroon -{ - // parameter validation - internal static void Validate( - int lookbackPeriods) - { - // check parameter arguments - if (lookbackPeriods <= 0) - { - throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, - "Lookback periods must be greater than 0 for Aroon."); - } - } - -} diff --git a/src/a-d/Aroon/Aroon.StaticSeries.cs b/src/a-d/Aroon/Aroon.StaticSeries.cs index a8af83f1e..1d60eadad 100644 --- a/src/a-d/Aroon/Aroon.StaticSeries.cs +++ b/src/a-d/Aroon/Aroon.StaticSeries.cs @@ -2,14 +2,14 @@ namespace Skender.Stock.Indicators; // AROON OSCILLATOR (SERIES) -public static partial class Indicator +public static partial class Aroon { private static List CalcAroon( this List source, int lookbackPeriods) { // check parameter arguments - Aroon.Validate(lookbackPeriods); + Validate(lookbackPeriods); // initialize int length = source.Count; diff --git a/src/a-d/Aroon/Aroon.Utilities.cs b/src/a-d/Aroon/Aroon.Utilities.cs index 66eb9d036..9a3fde239 100644 --- a/src/a-d/Aroon/Aroon.Utilities.cs +++ b/src/a-d/Aroon/Aroon.Utilities.cs @@ -1,6 +1,6 @@ namespace Skender.Stock.Indicators; -public static partial class Indicator +public static partial class Aroon { // remove recommended periods /// @@ -13,4 +13,16 @@ public static IReadOnlyList RemoveWarmupPeriods( return results.Remove(removePeriods); } + + // parameter validation + internal static void Validate( + int lookbackPeriods) + { + // check parameter arguments + if (lookbackPeriods <= 0) + { + throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, + "Lookback periods must be greater than 0 for Aroon."); + } + } } diff --git a/src/a-d/Atr/Atr.Api.cs b/src/a-d/Atr/Atr.Api.cs index a10d67c21..39f5c7c08 100644 --- a/src/a-d/Atr/Atr.Api.cs +++ b/src/a-d/Atr/Atr.Api.cs @@ -7,7 +7,7 @@ public static partial class Atr // SERIES, from TQuote /// /// - public static IReadOnlyList GetAtr( + public static IReadOnlyList ToAtr( this IEnumerable quotes, int lookbackPeriods = 14) where TQuote : IQuote => quotes diff --git a/src/a-d/AtrStop/AtrStop.Api.cs b/src/a-d/AtrStop/AtrStop.Api.cs index f985cd541..cd4fbebee 100644 --- a/src/a-d/AtrStop/AtrStop.Api.cs +++ b/src/a-d/AtrStop/AtrStop.Api.cs @@ -7,7 +7,7 @@ public static partial class AtrStop // SERIES, from TQuote /// /// - public static IReadOnlyList GetAtrStop( + public static IReadOnlyList ToAtrStop( this IEnumerable quotes, int lookbackPeriods = 21, double multiplier = 3, diff --git a/src/a-d/Awesome/Awesome.Api.cs b/src/a-d/Awesome/Awesome.Api.cs index ccf389b14..918f79bd7 100644 --- a/src/a-d/Awesome/Awesome.Api.cs +++ b/src/a-d/Awesome/Awesome.Api.cs @@ -1,10 +1,10 @@ namespace Skender.Stock.Indicators; // AWESOME OSCILLATOR (API) -public static partial class Indicator +public static partial class Awesome { // SERIES, from CHAIN - public static IReadOnlyList GetAwesome( + public static IReadOnlyList ToAwesome( this IEnumerable source, int fastPeriods = 5, int slowPeriods = 34) diff --git a/src/a-d/Awesome/Awesome.Common.cs b/src/a-d/Awesome/Awesome.Common.cs deleted file mode 100644 index a8c194923..000000000 --- a/src/a-d/Awesome/Awesome.Common.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace Skender.Stock.Indicators; - -// AWESOME OSCILLATOR (COMMON) - -public static class Awesome -{ - // parameter validation - internal static void Validate( - int fastPeriods, - int slowPeriods) - { - // check parameter arguments - if (fastPeriods <= 0) - { - throw new ArgumentOutOfRangeException(nameof(slowPeriods), slowPeriods, - "Fast periods must be greater than 0 for Awesome Oscillator."); - } - - if (slowPeriods <= fastPeriods) - { - throw new ArgumentOutOfRangeException(nameof(slowPeriods), slowPeriods, - "Slow periods must be larger than Fast Periods for Awesome Oscillator."); - } - } - -} diff --git a/src/a-d/Awesome/Awesome.StaticSeries.cs b/src/a-d/Awesome/Awesome.StaticSeries.cs index a2ca091fc..67d20e027 100644 --- a/src/a-d/Awesome/Awesome.StaticSeries.cs +++ b/src/a-d/Awesome/Awesome.StaticSeries.cs @@ -2,7 +2,7 @@ namespace Skender.Stock.Indicators; // AWESOME OSCILLATOR (SERIES) -public static partial class Indicator +public static partial class Awesome { private static List CalcAwesome( this List source, diff --git a/src/a-d/Awesome/Awesome.Utilities.cs b/src/a-d/Awesome/Awesome.Utilities.cs index cd8ec64ee..5b48dbbaf 100644 --- a/src/a-d/Awesome/Awesome.Utilities.cs +++ b/src/a-d/Awesome/Awesome.Utilities.cs @@ -1,6 +1,6 @@ namespace Skender.Stock.Indicators; -public static partial class Indicator +public static partial class Awesome { // remove recommended periods /// @@ -13,4 +13,23 @@ public static IReadOnlyList RemoveWarmupPeriods( return results.Remove(removePeriods); } + + // parameter validation + internal static void Validate( + int fastPeriods, + int slowPeriods) + { + // check parameter arguments + if (fastPeriods <= 0) + { + throw new ArgumentOutOfRangeException(nameof(slowPeriods), slowPeriods, + "Fast periods must be greater than 0 for Awesome Oscillator."); + } + + if (slowPeriods <= fastPeriods) + { + throw new ArgumentOutOfRangeException(nameof(slowPeriods), slowPeriods, + "Slow periods must be larger than Fast Periods for Awesome Oscillator."); + } + } } diff --git a/src/a-d/Beta/Beta.Api.cs b/src/a-d/Beta/Beta.Api.cs index 989c47cac..5b4ef72dc 100644 --- a/src/a-d/Beta/Beta.Api.cs +++ b/src/a-d/Beta/Beta.Api.cs @@ -1,10 +1,10 @@ namespace Skender.Stock.Indicators; // BETA COEFFICIENT (API) -public static partial class Indicator +public static partial class Beta { // SERIES, from CHAINS (both inputs reusable) - public static IReadOnlyList GetBeta( + public static IReadOnlyList ToBeta( this IEnumerable evalSource, IEnumerable mrktSource, int lookbackPeriods, diff --git a/src/a-d/Beta/Beta.Common.cs b/src/a-d/Beta/Beta.Common.cs deleted file mode 100644 index 384b86fc5..000000000 --- a/src/a-d/Beta/Beta.Common.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace Skender.Stock.Indicators; - -// BETA COEFFICIENT (COMMON) - -public static class Beta -{ - // parameter validation - internal static void Validate( - List sourceEval, - List sourceMrkt, - int lookbackPeriods) - where T : ISeries - { - // check parameter arguments - if (lookbackPeriods <= 0) - { - throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, - "Lookback periods must be greater than 0 for Beta."); - } - - // check quotes - if (sourceEval.Count != sourceMrkt.Count) - { - throw new InvalidQuotesException( - nameof(sourceEval), - "Eval quotes should have the same number of Market quotes for Beta."); - } - } - -} diff --git a/src/a-d/Beta/Beta.StaticSeries.cs b/src/a-d/Beta/Beta.StaticSeries.cs index f584c9f83..48b50c8c0 100644 --- a/src/a-d/Beta/Beta.StaticSeries.cs +++ b/src/a-d/Beta/Beta.StaticSeries.cs @@ -2,7 +2,7 @@ namespace Skender.Stock.Indicators; // BETA COEFFICIENT (SERIES) -public static partial class Indicator +public static partial class Beta { // NOTE: sequence swapped from API private static List CalcBeta( @@ -146,7 +146,7 @@ private static List CalcBeta( } // calculate correlation, covariance, and variance - CorrResult c = PeriodCorrelation( + CorrResult c = Correlation.PeriodCorrelation( default, [.. dataA], [.. dataB]); diff --git a/src/a-d/Beta/Beta.Utilities.cs b/src/a-d/Beta/Beta.Utilities.cs index 9cb071a21..f4f6617a4 100644 --- a/src/a-d/Beta/Beta.Utilities.cs +++ b/src/a-d/Beta/Beta.Utilities.cs @@ -1,6 +1,6 @@ namespace Skender.Stock.Indicators; -public static partial class Indicator +public static partial class Beta { // remove recommended periods /// @@ -13,4 +13,27 @@ public static IReadOnlyList RemoveWarmupPeriods( return results.Remove(removePeriods); } + + // parameter validation + internal static void Validate( + List sourceEval, + List sourceMrkt, + int lookbackPeriods) + where T : ISeries + { + // check parameter arguments + if (lookbackPeriods <= 0) + { + throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, + "Lookback periods must be greater than 0 for Beta."); + } + + // check quotes + if (sourceEval.Count != sourceMrkt.Count) + { + throw new InvalidQuotesException( + nameof(sourceEval), + "Eval quotes should have the same number of Market quotes for Beta."); + } + } } diff --git a/src/a-d/BollingerBands/BollingerBands.Api.cs b/src/a-d/BollingerBands/BollingerBands.Api.cs index aa4c0a99d..c79096c79 100644 --- a/src/a-d/BollingerBands/BollingerBands.Api.cs +++ b/src/a-d/BollingerBands/BollingerBands.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetBollingerBands( + public static IReadOnlyList ToBollingerBands( this IReadOnlyList results, int lookbackPeriods = 20, double standardDeviations = 2) diff --git a/src/a-d/Bop/Bop.Api.cs b/src/a-d/Bop/Bop.Api.cs index 0cc2e8413..9461ecdf2 100644 --- a/src/a-d/Bop/Bop.Api.cs +++ b/src/a-d/Bop/Bop.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetBop( + public static IReadOnlyList ToBop( this IEnumerable quotes, int smoothPeriods = 14) where TQuote : IQuote => quotes diff --git a/src/a-d/Cci/Cci.Api.cs b/src/a-d/Cci/Cci.Api.cs index 1d262caac..2ada8940a 100644 --- a/src/a-d/Cci/Cci.Api.cs +++ b/src/a-d/Cci/Cci.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetCci( + public static IReadOnlyList ToCci( this IEnumerable quotes, int lookbackPeriods = 20) where TQuote : IQuote => quotes diff --git a/src/a-d/ChaikinOsc/ChaikinOsc.Api.cs b/src/a-d/ChaikinOsc/ChaikinOsc.Api.cs index 8871af1ed..5e5352a4d 100644 --- a/src/a-d/ChaikinOsc/ChaikinOsc.Api.cs +++ b/src/a-d/ChaikinOsc/ChaikinOsc.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetChaikinOsc( + public static IReadOnlyList ToChaikinOsc( this IEnumerable quotes, int fastPeriods = 3, int slowPeriods = 10) diff --git a/src/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.cs b/src/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.cs index 0cc49d026..257c8d69a 100644 --- a/src/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.cs +++ b/src/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.cs @@ -18,7 +18,7 @@ private static List CalcChaikinOsc( List results = new(length); // money flow - List adlResults = source.CalcAdl(); + var adlResults = source.ToAdl(); // fast/slow EMA of ADL IReadOnlyList adlEmaSlow = adlResults.ToEma(slowPeriods); diff --git a/src/a-d/Chandelier/Chandelier.Api.cs b/src/a-d/Chandelier/Chandelier.Api.cs index 60f36c875..cd0f6d502 100644 --- a/src/a-d/Chandelier/Chandelier.Api.cs +++ b/src/a-d/Chandelier/Chandelier.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetChandelier( + public static IReadOnlyList ToChandelier( this IEnumerable quotes, int lookbackPeriods = 22, double multiplier = 3, diff --git a/src/a-d/Chop/Chop.Api.cs b/src/a-d/Chop/Chop.Api.cs index e834dfec5..7aac59be9 100644 --- a/src/a-d/Chop/Chop.Api.cs +++ b/src/a-d/Chop/Chop.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetChop( + public static IReadOnlyList ToChop( this IEnumerable quotes, int lookbackPeriods = 14) where TQuote : IQuote => quotes diff --git a/src/a-d/Cmf/Cmf.Api.cs b/src/a-d/Cmf/Cmf.Api.cs index 96f8c5961..8c3465e69 100644 --- a/src/a-d/Cmf/Cmf.Api.cs +++ b/src/a-d/Cmf/Cmf.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetCmf( + public static IReadOnlyList ToCmf( this IEnumerable quotes, int lookbackPeriods = 20) where TQuote : IQuote => quotes diff --git a/src/a-d/Cmf/Cmf.StaticSeries.cs b/src/a-d/Cmf/Cmf.StaticSeries.cs index 6da645c0d..d2b2a79ac 100644 --- a/src/a-d/Cmf/Cmf.StaticSeries.cs +++ b/src/a-d/Cmf/Cmf.StaticSeries.cs @@ -19,7 +19,7 @@ double[] volume // initialize int length = volume.Length; List results = new(length); - List adlResults = source.CalcAdl(); + IReadOnlyList adlResults = source.ToAdl(); // roll through source values for (int i = 0; i < length; i++) diff --git a/src/a-d/Cmo/Cmo.Api.cs b/src/a-d/Cmo/Cmo.Api.cs index cd9e4c85b..db1875b9e 100644 --- a/src/a-d/Cmo/Cmo.Api.cs +++ b/src/a-d/Cmo/Cmo.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetCmo( + public static IReadOnlyList ToCmo( this IEnumerable source, int lookbackPeriods) where T : IReusable diff --git a/src/a-d/ConnorsRsi/ConnorsRsi.Api.cs b/src/a-d/ConnorsRsi/ConnorsRsi.Api.cs index 949647b72..dfa5e4f7f 100644 --- a/src/a-d/ConnorsRsi/ConnorsRsi.Api.cs +++ b/src/a-d/ConnorsRsi/ConnorsRsi.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetConnorsRsi( + public static IReadOnlyList ToConnorsRsi( this IReadOnlyList results, int rsiPeriods = 3, int streakPeriods = 2, diff --git a/src/a-d/Correlation/Correlation.Api.cs b/src/a-d/Correlation/Correlation.Api.cs index cfd99f390..e24ac26bb 100644 --- a/src/a-d/Correlation/Correlation.Api.cs +++ b/src/a-d/Correlation/Correlation.Api.cs @@ -1,10 +1,10 @@ namespace Skender.Stock.Indicators; // CORRELATION COEFFICIENT (API) -public static partial class Indicator +public static partial class Correlation { // SERIES, from CHAINS (both inputs reusable) - public static IReadOnlyList GetCorrelation( + public static IReadOnlyList ToCorrelation( this IEnumerable sourceA, IEnumerable sourceB, int lookbackPeriods) diff --git a/src/a-d/Correlation/Correlation.Common.cs b/src/a-d/Correlation/Correlation.Common.cs deleted file mode 100644 index 043d2d37a..000000000 --- a/src/a-d/Correlation/Correlation.Common.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace Skender.Stock.Indicators; - -// CORRELATION COEFFICIENT (COMMON) - -public static class Correlation -{ - // parameter validation - internal static void Validate( - List sourceA, - List sourceB, - int lookbackPeriods) - where T : ISeries - { - // check parameter arguments - if (lookbackPeriods <= 0) - { - throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, - "Lookback periods must be greater than 0 for Correlation."); - } - - // check quotes - if (sourceA.Count != sourceB.Count) - { - throw new InvalidQuotesException( - nameof(sourceB), - "B quotes should have at least as many records as A quotes for Correlation."); - } - } - -} diff --git a/src/a-d/Correlation/Correlation.StaticSeries.cs b/src/a-d/Correlation/Correlation.StaticSeries.cs index a07a0092e..3d6be5563 100644 --- a/src/a-d/Correlation/Correlation.StaticSeries.cs +++ b/src/a-d/Correlation/Correlation.StaticSeries.cs @@ -2,7 +2,7 @@ namespace Skender.Stock.Indicators; // CORRELATION COEFFICIENT (SERIES) -public static partial class Indicator +public static partial class Correlation { private static List CalcCorrelation( this List sourceA, @@ -62,7 +62,7 @@ private static List CalcCorrelation( } // calculate correlation - private static CorrResult PeriodCorrelation( + internal static CorrResult PeriodCorrelation( DateTime timestamp, double[] dataA, double[] dataB) diff --git a/src/a-d/Correlation/Correlation.Utilities.cs b/src/a-d/Correlation/Correlation.Utilities.cs index dafbf54fa..eb889b27c 100644 --- a/src/a-d/Correlation/Correlation.Utilities.cs +++ b/src/a-d/Correlation/Correlation.Utilities.cs @@ -1,6 +1,6 @@ namespace Skender.Stock.Indicators; -public static partial class Indicator +public static partial class Correlation { // remove recommended periods /// @@ -13,4 +13,27 @@ public static IReadOnlyList RemoveWarmupPeriods( return results.Remove(removePeriods); } + + // parameter validation + internal static void Validate( + List sourceA, + List sourceB, + int lookbackPeriods) + where T : ISeries + { + // check parameter arguments + if (lookbackPeriods <= 0) + { + throw new ArgumentOutOfRangeException(nameof(lookbackPeriods), lookbackPeriods, + "Lookback periods must be greater than 0 for Correlation."); + } + + // check quotes + if (sourceA.Count != sourceB.Count) + { + throw new InvalidQuotesException( + nameof(sourceB), + "B quotes should have at least as many records as A quotes for Correlation."); + } + } } diff --git a/src/a-d/Dema/Dema.Api.cs b/src/a-d/Dema/Dema.Api.cs index bbabc1acb..6354fce81 100644 --- a/src/a-d/Dema/Dema.Api.cs +++ b/src/a-d/Dema/Dema.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetDema( + public static IReadOnlyList ToDema( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/a-d/Doji/Doji.Api.cs b/src/a-d/Doji/Doji.Api.cs index feeb2ce96..9dabc60f3 100644 --- a/src/a-d/Doji/Doji.Api.cs +++ b/src/a-d/Doji/Doji.Api.cs @@ -17,7 +17,7 @@ public static partial class Indicator /// Optional.Maximum absolute percent difference in open and close price. /// Time series of Doji values. /// Invalid parameter value provided. - public static IReadOnlyList GetDoji( + public static IReadOnlyList ToDoji( this IEnumerable quotes, double maxPriceChangePercent = 0.1) where TQuote : IQuote => quotes diff --git a/src/a-d/Donchian/Donchian.Api.cs b/src/a-d/Donchian/Donchian.Api.cs index 1a3d7db7d..7d9d57dfb 100644 --- a/src/a-d/Donchian/Donchian.Api.cs +++ b/src/a-d/Donchian/Donchian.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetDonchian( + public static IReadOnlyList ToDonchian( this IEnumerable quotes, int lookbackPeriods = 20) where TQuote : IQuote => quotes diff --git a/src/a-d/Dpo/Dpo.Api.cs b/src/a-d/Dpo/Dpo.Api.cs index 740f3b503..4c224e5e4 100644 --- a/src/a-d/Dpo/Dpo.Api.cs +++ b/src/a-d/Dpo/Dpo.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetDpo( + public static IReadOnlyList ToDpo( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/a-d/Dynamic/Dynamic.Api.cs b/src/a-d/Dynamic/Dynamic.Api.cs index 9a953f59f..7fbccb8ca 100644 --- a/src/a-d/Dynamic/Dynamic.Api.cs +++ b/src/a-d/Dynamic/Dynamic.Api.cs @@ -5,7 +5,7 @@ namespace Skender.Stock.Indicators; public static partial class MgDynamic { // SERIES, from CHAIN - public static IReadOnlyList GetDynamic( + public static IReadOnlyList ToDynamic( this IReadOnlyList results, int lookbackPeriods, double kFactor = 0.6) diff --git a/src/e-k/ElderRay/ElderRay.Api.cs b/src/e-k/ElderRay/ElderRay.Api.cs index 4c437b693..fbc8f4a7a 100644 --- a/src/e-k/ElderRay/ElderRay.Api.cs +++ b/src/e-k/ElderRay/ElderRay.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetElderRay( + public static IReadOnlyList ToElderRay( this IEnumerable quotes, int lookbackPeriods = 13) where TQuote : IQuote => quotes diff --git a/src/e-k/Epma/Epma.Api.cs b/src/e-k/Epma/Epma.Api.cs index 0937ac444..6136f921a 100644 --- a/src/e-k/Epma/Epma.Api.cs +++ b/src/e-k/Epma/Epma.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetEpma( + public static IReadOnlyList ToEpma( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/e-k/Fcb/Fcb.Api.cs b/src/e-k/Fcb/Fcb.Api.cs index 0b48e1fde..1345e3a9a 100644 --- a/src/e-k/Fcb/Fcb.Api.cs +++ b/src/e-k/Fcb/Fcb.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetFcb( + public static IReadOnlyList ToFcb( this IEnumerable quotes, int windowSpan = 2) where TQuote : IQuote => quotes diff --git a/src/e-k/FisherTransform/FisherTransform.Api.cs b/src/e-k/FisherTransform/FisherTransform.Api.cs index 51cec1dc9..db9488809 100644 --- a/src/e-k/FisherTransform/FisherTransform.Api.cs +++ b/src/e-k/FisherTransform/FisherTransform.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetFisherTransform( + public static IReadOnlyList ToFisherTransform( this IReadOnlyList results, int lookbackPeriods = 10) where T : IReusable diff --git a/src/e-k/ForceIndex/ForceIndex.Api.cs b/src/e-k/ForceIndex/ForceIndex.Api.cs index f095cf270..34bf5ab9d 100644 --- a/src/e-k/ForceIndex/ForceIndex.Api.cs +++ b/src/e-k/ForceIndex/ForceIndex.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetForceIndex( + public static IReadOnlyList ToForceIndex( this IEnumerable quotes, int lookbackPeriods = 2) where TQuote : IQuote => quotes diff --git a/src/e-k/Fractal/Fractal.Api.cs b/src/e-k/Fractal/Fractal.Api.cs index 01972eeb4..82e1c436e 100644 --- a/src/e-k/Fractal/Fractal.Api.cs +++ b/src/e-k/Fractal/Fractal.Api.cs @@ -5,7 +5,7 @@ public static partial class Indicator { /// /// - public static IReadOnlyList GetFractal( + public static IReadOnlyList ToFractal( this IEnumerable quotes, int windowSpan = 2, EndType endType = EndType.HighLow) diff --git a/src/e-k/Gator/Gator.Api.cs b/src/e-k/Gator/Gator.Api.cs index 0682aaf92..384112566 100644 --- a/src/e-k/Gator/Gator.Api.cs +++ b/src/e-k/Gator/Gator.Api.cs @@ -21,11 +21,11 @@ public static partial class Indicator /// Time series of Gator values. // See Alligator API for explanation of unusual setup. - public static IReadOnlyList GetGator( + public static IReadOnlyList ToGator( this IEnumerable source) where T : IReusable => source - .GetAlligator() + .ToAlligator() .GetGator(); // SERIES, from [custom] Alligator diff --git a/src/e-k/HeikinAshi/HeikinAshi.Api.cs b/src/e-k/HeikinAshi/HeikinAshi.Api.cs index d17a73c29..f46747dee 100644 --- a/src/e-k/HeikinAshi/HeikinAshi.Api.cs +++ b/src/e-k/HeikinAshi/HeikinAshi.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetHeikinAshi( + public static IReadOnlyList ToHeikinAshi( this IEnumerable quotes) where TQuote : IQuote => quotes .ToSortedList() diff --git a/src/e-k/Hma/Hma.Api.cs b/src/e-k/Hma/Hma.Api.cs index 8d11e4041..c5c247fa8 100644 --- a/src/e-k/Hma/Hma.Api.cs +++ b/src/e-k/Hma/Hma.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetHma( + public static IReadOnlyList ToHma( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/e-k/HtTrendline/HtTrendline.Api.cs b/src/e-k/HtTrendline/HtTrendline.Api.cs index 96d163808..4f70cec5f 100644 --- a/src/e-k/HtTrendline/HtTrendline.Api.cs +++ b/src/e-k/HtTrendline/HtTrendline.Api.cs @@ -17,7 +17,7 @@ public static partial class Indicator /// /// Time-series values to transform. /// Time series of HTL values and smoothed price. - public static IReadOnlyList GetHtTrendline( + public static IReadOnlyList ToHtTrendline( this IEnumerable source) where T : IReusable => source diff --git a/src/e-k/Hurst/Hurst.Api.cs b/src/e-k/Hurst/Hurst.Api.cs index ae882f69c..cc50f6ca5 100644 --- a/src/e-k/Hurst/Hurst.Api.cs +++ b/src/e-k/Hurst/Hurst.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetHurst( + public static IReadOnlyList ToHurst( this IReadOnlyList results, int lookbackPeriods = 100) where T : IReusable diff --git a/src/e-k/Ichimoku/Ichimoku.Api.cs b/src/e-k/Ichimoku/Ichimoku.Api.cs index d0d80c0c3..818d5d2e8 100644 --- a/src/e-k/Ichimoku/Ichimoku.Api.cs +++ b/src/e-k/Ichimoku/Ichimoku.Api.cs @@ -5,7 +5,7 @@ public static partial class Indicator { /// /// - public static IReadOnlyList GetIchimoku( + public static IReadOnlyList ToIchimoku( this IEnumerable quotes, int tenkanPeriods = 9, int kijunPeriods = 26, diff --git a/src/e-k/Kama/Kama.Api.cs b/src/e-k/Kama/Kama.Api.cs index 8c9484f62..3edfeaa42 100644 --- a/src/e-k/Kama/Kama.Api.cs +++ b/src/e-k/Kama/Kama.Api.cs @@ -5,7 +5,7 @@ namespace Skender.Stock.Indicators; public static partial class Kama { // SERIES, from CHAIN - public static IReadOnlyList GetKama( + public static IReadOnlyList ToKama( this IEnumerable source, int erPeriods = 10, int fastPeriods = 2, diff --git a/src/e-k/Keltner/Keltner.Api.cs b/src/e-k/Keltner/Keltner.Api.cs index 7bffd9e49..e5ec5722b 100644 --- a/src/e-k/Keltner/Keltner.Api.cs +++ b/src/e-k/Keltner/Keltner.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetKeltner( + public static IReadOnlyList ToKeltner( this IEnumerable quotes, int emaPeriods = 20, double multiplier = 2, diff --git a/src/e-k/Kvo/Kvo.Api.cs b/src/e-k/Kvo/Kvo.Api.cs index b00bc2768..961b6e4db 100644 --- a/src/e-k/Kvo/Kvo.Api.cs +++ b/src/e-k/Kvo/Kvo.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetKvo( + public static IReadOnlyList ToKvo( this IEnumerable quotes, int fastPeriods = 34, int slowPeriods = 55, diff --git a/src/m-r/MaEnvelopes/MaEnvelopes.Api.cs b/src/m-r/MaEnvelopes/MaEnvelopes.Api.cs index d83d0b2f8..b68d153a8 100644 --- a/src/m-r/MaEnvelopes/MaEnvelopes.Api.cs +++ b/src/m-r/MaEnvelopes/MaEnvelopes.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetMaEnvelopes( + public static IReadOnlyList ToMaEnvelopes( this IReadOnlyList results, int lookbackPeriods, double percentOffset = 2.5, diff --git a/src/m-r/Macd/MacdApi.cs b/src/m-r/Macd/MacdApi.cs index a5d342aea..502edebf0 100644 --- a/src/m-r/Macd/MacdApi.cs +++ b/src/m-r/Macd/MacdApi.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetMacd( + public static IReadOnlyList ToMacd( this IReadOnlyList results, int fastPeriods = 12, int slowPeriods = 26, diff --git a/src/m-r/Mama/Mama.Api.cs b/src/m-r/Mama/Mama.Api.cs index 34264484d..f9c6d57b4 100644 --- a/src/m-r/Mama/Mama.Api.cs +++ b/src/m-r/Mama/Mama.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetMama( + public static IReadOnlyList ToMama( this IReadOnlyList results, double fastLimit = 0.5, double slowLimit = 0.05) diff --git a/src/m-r/Marubozu/Marubozu.Api.cs b/src/m-r/Marubozu/Marubozu.Api.cs index b0315cc7c..5b91b90af 100644 --- a/src/m-r/Marubozu/Marubozu.Api.cs +++ b/src/m-r/Marubozu/Marubozu.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetMarubozu( + public static IReadOnlyList ToMarubozu( this IEnumerable quotes, double minBodyPercent = 95) where TQuote : IQuote => quotes diff --git a/src/m-r/Mfi/Mfi.Api.cs b/src/m-r/Mfi/Mfi.Api.cs index 6dc4d0bab..502e4f090 100644 --- a/src/m-r/Mfi/Mfi.Api.cs +++ b/src/m-r/Mfi/Mfi.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetMfi( + public static IReadOnlyList ToMfi( this IEnumerable quotes, int lookbackPeriods = 14) where TQuote : IQuote => quotes diff --git a/src/m-r/Obv/Obv.Api.cs b/src/m-r/Obv/Obv.Api.cs index 8eefcd0b8..0431a263a 100644 --- a/src/m-r/Obv/Obv.Api.cs +++ b/src/m-r/Obv/Obv.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetObv( + public static IReadOnlyList ToObv( this IEnumerable quotes) where TQuote : IQuote => quotes .ToQuoteDList() diff --git a/src/m-r/ParabolicSar/ParabolicSar.Api.cs b/src/m-r/ParabolicSar/ParabolicSar.Api.cs index 56da5dbdd..f43fd562d 100644 --- a/src/m-r/ParabolicSar/ParabolicSar.Api.cs +++ b/src/m-r/ParabolicSar/ParabolicSar.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetParabolicSar( + public static IReadOnlyList ToParabolicSar( this IEnumerable quotes, double accelerationStep = 0.02, double maxAccelerationFactor = 0.2) diff --git a/src/m-r/PivotPoints/PivotPoints.Api.cs b/src/m-r/PivotPoints/PivotPoints.Api.cs index be099965a..c6d715677 100644 --- a/src/m-r/PivotPoints/PivotPoints.Api.cs +++ b/src/m-r/PivotPoints/PivotPoints.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetPivotPoints( + public static IReadOnlyList ToPivotPoints( this IEnumerable quotes, PeriodSize windowSize, PivotPointType pointType = PivotPointType.Standard) diff --git a/src/m-r/Pivots/Pivots.Api.cs b/src/m-r/Pivots/Pivots.Api.cs index d2157f35a..551159008 100644 --- a/src/m-r/Pivots/Pivots.Api.cs +++ b/src/m-r/Pivots/Pivots.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetPivots( + public static IReadOnlyList ToPivots( this IEnumerable quotes, int leftSpan = 2, int rightSpan = 2, diff --git a/src/m-r/Pmo/Pmo.Api.cs b/src/m-r/Pmo/Pmo.Api.cs index 99801c5d0..fcf815367 100644 --- a/src/m-r/Pmo/Pmo.Api.cs +++ b/src/m-r/Pmo/Pmo.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetPmo( + public static IReadOnlyList ToPmo( this IReadOnlyList results, int timePeriods = 35, int smoothPeriods = 20, diff --git a/src/m-r/Prs/Prs.Api.cs b/src/m-r/Prs/Prs.Api.cs index f169896d3..347e0709a 100644 --- a/src/m-r/Prs/Prs.Api.cs +++ b/src/m-r/Prs/Prs.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAINS (both inputs reusable) - public static IReadOnlyList GetPrs( + public static IReadOnlyList ToPrs( this IEnumerable quotesEval, IEnumerable quotesBase, int? lookbackPeriods = null) diff --git a/src/m-r/Pvo/Pvo.Api.cs b/src/m-r/Pvo/Pvo.Api.cs index 0c24ea386..321f7b018 100644 --- a/src/m-r/Pvo/Pvo.Api.cs +++ b/src/m-r/Pvo/Pvo.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetPvo( + public static IReadOnlyList ToPvo( this IEnumerable quotes, int fastPeriods = 12, int slowPeriods = 26, diff --git a/src/m-r/Renko/Renko.Api.cs b/src/m-r/Renko/Renko.Api.cs index 9f2b1c5df..a70e86b5a 100644 --- a/src/m-r/Renko/Renko.Api.cs +++ b/src/m-r/Renko/Renko.Api.cs @@ -5,7 +5,7 @@ namespace Skender.Stock.Indicators; public static partial class Renko { // SERIES, from TQuote - public static IReadOnlyList GetRenko( + public static IReadOnlyList ToRenko( this IEnumerable quotes, decimal brickSize, EndType endType = EndType.Close) diff --git a/src/m-r/Roc/Roc.Api.cs b/src/m-r/Roc/Roc.Api.cs index a6759f4e5..43fda5055 100644 --- a/src/m-r/Roc/Roc.Api.cs +++ b/src/m-r/Roc/Roc.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetRoc( + public static IReadOnlyList ToRoc( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/m-r/RocWb/RocWb.Api.cs b/src/m-r/RocWb/RocWb.Api.cs index ed5f5bed1..94f3e65c9 100644 --- a/src/m-r/RocWb/RocWb.Api.cs +++ b/src/m-r/RocWb/RocWb.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetRocWb( + public static IReadOnlyList ToRocWb( this IReadOnlyList results, int lookbackPeriods, int emaPeriods, diff --git a/src/m-r/RollingPivots/RollingPivots.Api.cs b/src/m-r/RollingPivots/RollingPivots.Api.cs index e7759d288..2adb3b664 100644 --- a/src/m-r/RollingPivots/RollingPivots.Api.cs +++ b/src/m-r/RollingPivots/RollingPivots.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetRollingPivots( + public static IReadOnlyList ToRollingPivots( this IEnumerable quotes, int windowPeriods, int offsetPeriods, diff --git a/src/m-r/Rsi/Rsi.Api.cs b/src/m-r/Rsi/Rsi.Api.cs index 85f27accd..1023e4b8e 100644 --- a/src/m-r/Rsi/Rsi.Api.cs +++ b/src/m-r/Rsi/Rsi.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetRsi( + public static IReadOnlyList ToRsi( this IReadOnlyList results, int lookbackPeriods = 14) where T : IReusable diff --git a/src/s-z/Slope/Slope.Api.cs b/src/s-z/Slope/Slope.Api.cs index 1760f9ae2..8a2df0575 100644 --- a/src/s-z/Slope/Slope.Api.cs +++ b/src/s-z/Slope/Slope.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetSlope( + public static IReadOnlyList ToSlope( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/SmaAnalysis/SmaAnalysis.Api.cs b/src/s-z/SmaAnalysis/SmaAnalysis.Api.cs index 0dfe24f95..fb9cd3a88 100644 --- a/src/s-z/SmaAnalysis/SmaAnalysis.Api.cs +++ b/src/s-z/SmaAnalysis/SmaAnalysis.Api.cs @@ -6,7 +6,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // ANALYSIS, from CHAIN - public static IReadOnlyList GetSmaAnalysis( + public static IReadOnlyList ToSmaAnalysis( this IEnumerable source, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/Smi/Smi.Api.cs b/src/s-z/Smi/Smi.Api.cs index 6bfefa7e3..a6abdc0c2 100644 --- a/src/s-z/Smi/Smi.Api.cs +++ b/src/s-z/Smi/Smi.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetSmi( + public static IReadOnlyList ToSmi( this IEnumerable quotes, int lookbackPeriods = 13, int firstSmoothPeriods = 25, diff --git a/src/s-z/Smma/Smma.Api.cs b/src/s-z/Smma/Smma.Api.cs index b792078a9..88eb1c5c8 100644 --- a/src/s-z/Smma/Smma.Api.cs +++ b/src/s-z/Smma/Smma.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetSmma( + public static IReadOnlyList ToSmma( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/StarcBands/StarcBands.Api.cs b/src/s-z/StarcBands/StarcBands.Api.cs index 572e2fddb..9ce66033b 100644 --- a/src/s-z/StarcBands/StarcBands.Api.cs +++ b/src/s-z/StarcBands/StarcBands.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetStarcBands( + public static IReadOnlyList ToStarcBands( this IEnumerable quotes, int smaPeriods, double multiplier = 2, diff --git a/src/s-z/Stc/Stc.Api.cs b/src/s-z/Stc/Stc.Api.cs index aa8b638b5..2da7c4075 100644 --- a/src/s-z/Stc/Stc.Api.cs +++ b/src/s-z/Stc/Stc.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetStc( + public static IReadOnlyList ToStc( this IReadOnlyList results, int cyclePeriods = 10, int fastPeriods = 23, diff --git a/src/s-z/StdDev/StdDev.Api.cs b/src/s-z/StdDev/StdDev.Api.cs index 6bc98569e..05ef0f06e 100644 --- a/src/s-z/StdDev/StdDev.Api.cs +++ b/src/s-z/StdDev/StdDev.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetStdDev( + public static IReadOnlyList ToStdDev( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/StdDevChannels/StdDevChannels.Api.cs b/src/s-z/StdDevChannels/StdDevChannels.Api.cs index 5557f4274..6851171dd 100644 --- a/src/s-z/StdDevChannels/StdDevChannels.Api.cs +++ b/src/s-z/StdDevChannels/StdDevChannels.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetStdDevChannels( + public static IReadOnlyList ToStdDevChannels( this IReadOnlyList results, int? lookbackPeriods = 20, double stdDeviations = 2) diff --git a/src/s-z/Stoch/Stoch.Api.cs b/src/s-z/Stoch/Stoch.Api.cs index 6b4d434e9..4cba11ab3 100644 --- a/src/s-z/Stoch/Stoch.Api.cs +++ b/src/s-z/Stoch/Stoch.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote (standard) /// /// - public static IReadOnlyList GetStoch( + public static IReadOnlyList ToStoch( this IEnumerable quotes, int lookbackPeriods = 14, int signalPeriods = 3, @@ -21,7 +21,7 @@ public static IReadOnlyList GetStoch( // SERIES, from TQuote (extended) /// /// - public static IReadOnlyList GetStoch( + public static IReadOnlyList ToStoch( this IEnumerable quotes, int lookbackPeriods, int signalPeriods, diff --git a/src/s-z/StochRsi/StochRsi.Api.cs b/src/s-z/StochRsi/StochRsi.Api.cs index cb0c41945..10853a986 100644 --- a/src/s-z/StochRsi/StochRsi.Api.cs +++ b/src/s-z/StochRsi/StochRsi.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetStochRsi( + public static IReadOnlyList ToStochRsi( this IReadOnlyList results, int rsiPeriods, int stochPeriods, diff --git a/src/s-z/SuperTrend/SuperTrend.Api.cs b/src/s-z/SuperTrend/SuperTrend.Api.cs index fba7807fd..cc9ddb23f 100644 --- a/src/s-z/SuperTrend/SuperTrend.Api.cs +++ b/src/s-z/SuperTrend/SuperTrend.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetSuperTrend( + public static IReadOnlyList ToSuperTrend( this IEnumerable quotes, int lookbackPeriods = 10, double multiplier = 3) diff --git a/src/s-z/T3/T3.Api.cs b/src/s-z/T3/T3.Api.cs index fbfb6794d..af3fa182c 100644 --- a/src/s-z/T3/T3.Api.cs +++ b/src/s-z/T3/T3.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetT3( + public static IReadOnlyList ToT3( this IReadOnlyList results, int lookbackPeriods = 5, double volumeFactor = 0.7) diff --git a/src/s-z/Tema/Tema.Api.cs b/src/s-z/Tema/Tema.Api.cs index b3b6f0107..50965ec0c 100644 --- a/src/s-z/Tema/Tema.Api.cs +++ b/src/s-z/Tema/Tema.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetTema( + public static IReadOnlyList ToTema( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/Tr/Tr.Api.cs b/src/s-z/Tr/Tr.Api.cs index a3596c016..3999229d1 100644 --- a/src/s-z/Tr/Tr.Api.cs +++ b/src/s-z/Tr/Tr.Api.cs @@ -7,7 +7,7 @@ public static partial class Tr // SERIES, from TQuote /// /// - public static IReadOnlyList GetTr( + public static IReadOnlyList ToTr( this IEnumerable quotes) where TQuote : IQuote => quotes .ToQuoteDList() diff --git a/src/s-z/Trix/Trix.Api.cs b/src/s-z/Trix/Trix.Api.cs index 3b114888d..0dad6ca8b 100644 --- a/src/s-z/Trix/Trix.Api.cs +++ b/src/s-z/Trix/Trix.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetTrix( + public static IReadOnlyList ToTrix( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/Tsi/Tsi.Api.cs b/src/s-z/Tsi/Tsi.Api.cs index 4d688f345..137f65929 100644 --- a/src/s-z/Tsi/Tsi.Api.cs +++ b/src/s-z/Tsi/Tsi.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetTsi( + public static IReadOnlyList ToTsi( this IReadOnlyList results, int lookbackPeriods = 25, int smoothPeriods = 13, diff --git a/src/s-z/UlcerIndex/UlcerIndex.Api.cs b/src/s-z/UlcerIndex/UlcerIndex.Api.cs index bb5322f22..61248598e 100644 --- a/src/s-z/UlcerIndex/UlcerIndex.Api.cs +++ b/src/s-z/UlcerIndex/UlcerIndex.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetUlcerIndex( + public static IReadOnlyList ToUlcerIndex( this IReadOnlyList results, int lookbackPeriods = 14) where T : IReusable diff --git a/src/s-z/Ultimate/Ultimate.Api.cs b/src/s-z/Ultimate/Ultimate.Api.cs index e76a7cad1..8b6cc2844 100644 --- a/src/s-z/Ultimate/Ultimate.Api.cs +++ b/src/s-z/Ultimate/Ultimate.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetUltimate( + public static IReadOnlyList ToUltimate( this IEnumerable quotes, int shortPeriods = 7, int middlePeriods = 14, diff --git a/src/s-z/VolatilityStop/VolatilityStop.Api.cs b/src/s-z/VolatilityStop/VolatilityStop.Api.cs index e2dec1829..4c551ada7 100644 --- a/src/s-z/VolatilityStop/VolatilityStop.Api.cs +++ b/src/s-z/VolatilityStop/VolatilityStop.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetVolatilityStop( + public static IReadOnlyList ToVolatilityStop( this IEnumerable quotes, int lookbackPeriods = 7, double multiplier = 3) diff --git a/src/s-z/Vortex/Vortex.Api.cs b/src/s-z/Vortex/Vortex.Api.cs index 8396c507d..837067dce 100644 --- a/src/s-z/Vortex/Vortex.Api.cs +++ b/src/s-z/Vortex/Vortex.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetVortex( + public static IReadOnlyList ToVortex( this IEnumerable quotes, int lookbackPeriods) where TQuote : IQuote => quotes diff --git a/src/s-z/Vwap/Vwap.Api.cs b/src/s-z/Vwap/Vwap.Api.cs index 4caa822f2..bf28da1bc 100644 --- a/src/s-z/Vwap/Vwap.Api.cs +++ b/src/s-z/Vwap/Vwap.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetVwap( + public static IReadOnlyList ToVwap( this IEnumerable quotes, DateTime? startDate = null) where TQuote : IQuote => quotes diff --git a/src/s-z/Vwma/Vwma.Api.cs b/src/s-z/Vwma/Vwma.Api.cs index 99845d0c5..edc82abf3 100644 --- a/src/s-z/Vwma/Vwma.Api.cs +++ b/src/s-z/Vwma/Vwma.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetVwma( + public static IReadOnlyList ToVwma( this IEnumerable quotes, int lookbackPeriods) where TQuote : IQuote => quotes diff --git a/src/s-z/WilliamsR/WilliamsR.Api.cs b/src/s-z/WilliamsR/WilliamsR.Api.cs index d8c8ef219..21b8e4a80 100644 --- a/src/s-z/WilliamsR/WilliamsR.Api.cs +++ b/src/s-z/WilliamsR/WilliamsR.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetWilliamsR( + public static IReadOnlyList ToWilliamsR( this IEnumerable quotes, int lookbackPeriods = 14) where TQuote : IQuote => quotes diff --git a/src/s-z/Wma/Wma.Api.cs b/src/s-z/Wma/Wma.Api.cs index f6d77132d..209e4f1fd 100644 --- a/src/s-z/Wma/Wma.Api.cs +++ b/src/s-z/Wma/Wma.Api.cs @@ -4,7 +4,7 @@ namespace Skender.Stock.Indicators; public static partial class Indicator { // SERIES, from CHAIN - public static IReadOnlyList GetWma( + public static IReadOnlyList ToWma( this IReadOnlyList results, int lookbackPeriods) where T : IReusable diff --git a/src/s-z/ZigZag/ZigZag.Api.cs b/src/s-z/ZigZag/ZigZag.Api.cs index 1bfbf81fa..531d2b7bf 100644 --- a/src/s-z/ZigZag/ZigZag.Api.cs +++ b/src/s-z/ZigZag/ZigZag.Api.cs @@ -6,7 +6,7 @@ public static partial class Indicator // SERIES, from TQuote /// /// - public static IReadOnlyList GetZigZag( + public static IReadOnlyList ToZigZag( this IEnumerable quotes, EndType endType = EndType.Close, decimal percentChange = 5) diff --git a/tests/indicators/_common/Generics/RemoveWarmup.Tests.cs b/tests/indicators/_common/Generics/RemoveWarmup.Tests.cs index 3f19c57bc..99abb398b 100644 --- a/tests/indicators/_common/Generics/RemoveWarmup.Tests.cs +++ b/tests/indicators/_common/Generics/RemoveWarmup.Tests.cs @@ -8,14 +8,14 @@ public void Standard() { // specific periods IReadOnlyList results = Quotes - .GetHeikinAshi() + .ToHeikinAshi() .RemoveWarmupPeriods(102); Assert.AreEqual(400, results.Count); // bad remove period Assert.ThrowsException(() - => Quotes.GetAdx().RemoveWarmupPeriods(-1)); + => Quotes.ToAdx().RemoveWarmupPeriods(-1)); } [TestMethod] @@ -23,7 +23,7 @@ public void TooMany() { // more than available IReadOnlyList results = Quotes - .GetHeikinAshi() + .ToHeikinAshi() .RemoveWarmupPeriods(600); Assert.AreEqual(0, results.Count); diff --git a/tests/indicators/_common/Reusable/Reusable.Utilities.Tests.cs b/tests/indicators/_common/Reusable/Reusable.Utilities.Tests.cs index 14bda1648..72c8433e6 100644 --- a/tests/indicators/_common/Reusable/Reusable.Utilities.Tests.cs +++ b/tests/indicators/_common/Reusable/Reusable.Utilities.Tests.cs @@ -7,7 +7,7 @@ public class Reusable : TestBase public void Condense() { List original = Quotes - .GetAdx() + .ToAdx() .ToList(); // make a few more in the middle null and NaN diff --git a/tests/indicators/a-d/Adl/Adl.StaticSeries.Tests.cs b/tests/indicators/a-d/Adl/Adl.StaticSeries.Tests.cs index d336216fa..1c98e391d 100644 --- a/tests/indicators/a-d/Adl/Adl.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Adl/Adl.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Adl : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetAdl(); + .ToAdl(); // proper quantities Assert.AreEqual(502, results.Count); @@ -28,7 +28,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetAdl() + .ToAdl() .ToSma(10); // assertions @@ -42,7 +42,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetAdl(); + .ToAdl(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => double.IsNaN(x.Adl))); @@ -52,7 +52,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetAdl(); + .ToAdl(); Assert.AreEqual(1246, r.Count); } @@ -61,7 +61,7 @@ public void BigData() public void RandomData() { IReadOnlyList r = RandomQuotes - .GetAdl(); + .ToAdl(); Assert.AreEqual(1000, r.Count); } @@ -70,12 +70,12 @@ public void RandomData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetAdl(); + .ToAdl(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetAdl(); + .ToAdl(); Assert.AreEqual(1, r1.Count); } diff --git a/tests/indicators/a-d/Adl/Adl.StreamHub.Tests.cs b/tests/indicators/a-d/Adl/Adl.StreamHub.Tests.cs index db3ba55b1..9b83c46a3 100644 --- a/tests/indicators/a-d/Adl/Adl.StreamHub.Tests.cs +++ b/tests/indicators/a-d/Adl/Adl.StreamHub.Tests.cs @@ -56,7 +56,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetAdl(); + .ToAdl(); // assert, should equal series streamList.Should().HaveCount(length - 1); @@ -102,7 +102,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetAdl() + .ToAdl() .ToSma(smaPeriods); // assert, should equal series diff --git a/tests/indicators/a-d/Adx/Adx.StaticSeries.Tests.cs b/tests/indicators/a-d/Adx/Adx.StaticSeries.Tests.cs index fbf8b2a65..fc01d9292 100644 --- a/tests/indicators/a-d/Adx/Adx.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Adx/Adx.StaticSeries.Tests.cs @@ -6,7 +6,7 @@ public class Adx : StaticSeriesTestBase [TestMethod] public override void Standard() { - IReadOnlyList results = Quotes.GetAdx(); + IReadOnlyList results = Quotes.ToAdx(); // proper quantities Assert.AreEqual(502, results.Count); @@ -46,7 +46,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetAdx() + .ToAdx() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -56,7 +56,7 @@ public void Chainor() [TestMethod] public override void BadData() { - IReadOnlyList r = BadQuotes.GetAdx(20); + IReadOnlyList r = BadQuotes.ToAdx(20); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Adx is double.NaN)); @@ -65,7 +65,7 @@ public override void BadData() [TestMethod] public void BigData() { - IReadOnlyList r = BigQuotes.GetAdx(200); + IReadOnlyList r = BigQuotes.ToAdx(200); Assert.AreEqual(1246, r.Count); } @@ -73,11 +73,11 @@ public void BigData() [TestMethod] public override void NoQuotes() { - IReadOnlyList r0 = Noquotes.GetAdx(5); + IReadOnlyList r0 = Noquotes.ToAdx(5); Assert.AreEqual(0, r0.Count); - IReadOnlyList r1 = Onequote.GetAdx(5); + IReadOnlyList r1 = Onequote.ToAdx(5); Assert.AreEqual(1, r1.Count); } @@ -90,7 +90,7 @@ public void Issue859() .Select(Imports.QuoteFromCsv) .OrderByDescending(x => x.Timestamp); - IReadOnlyList r = test859.GetAdx(); + IReadOnlyList r = test859.ToAdx(); Assert.AreEqual(0, r.Count(x => x.Adx is double.NaN)); Assert.AreEqual(595, r.Count); @@ -99,7 +99,7 @@ public void Issue859() [TestMethod] public void Zeroes() { - IReadOnlyList r = ZeroesQuotes.GetAdx(); + IReadOnlyList r = ZeroesQuotes.ToAdx(); Assert.AreEqual(0, r.Count(x => x.Adx is double.NaN)); Assert.AreEqual(200, r.Count); @@ -109,7 +109,7 @@ public void Zeroes() public void Removed() { IReadOnlyList results = Quotes - .GetAdx() + .ToAdx() .RemoveWarmupPeriods(); // assertions @@ -126,5 +126,5 @@ public void Exceptions() => // bad lookback period Assert.ThrowsException(() => - Quotes.GetAdx(1)); + Quotes.ToAdx(1)); } diff --git a/tests/indicators/a-d/Alligator/Alligator.StaticSeries.Tests.cs b/tests/indicators/a-d/Alligator/Alligator.StaticSeries.Tests.cs index 50399eeb0..e8c682b40 100644 --- a/tests/indicators/a-d/Alligator/Alligator.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Alligator/Alligator.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Alligator : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetAlligator(); + .ToAlligator(); // proper quantities Assert.AreEqual(502, results.Count); @@ -47,7 +47,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetAlligator(); + .ToAlligator(); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Jaw != null)); @@ -57,7 +57,7 @@ public void Chainee() public override void BadData() { IReadOnlyList r = BadQuotes - .GetAlligator(3, 3, 2, 1, 1, 1); + .ToAlligator(3, 3, 2, 1, 1, 1); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Jaw is double.NaN)); @@ -67,12 +67,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetAlligator(); + .ToAlligator(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetAlligator(); + .ToAlligator(); Assert.AreEqual(1, r1.Count); } @@ -81,7 +81,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetAlligator() + .ToAlligator() .Condense(); Assert.AreEqual(495, results.Count); @@ -96,7 +96,7 @@ public void Condense() public void Removed() { IReadOnlyList results = Quotes - .GetAlligator() + .ToAlligator() .RemoveWarmupPeriods(); Assert.AreEqual(502 - 21 - 250, results.Count); @@ -123,34 +123,34 @@ public void Exceptions() { // bad jaw lookback periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 13)); + Quotes.ToAlligator(13, 8, 13)); // bad teeth lookback periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 8, 5, 8)); + Quotes.ToAlligator(13, 8, 8, 5, 8)); // bad lips lookback periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 8, 5, 0)); + Quotes.ToAlligator(13, 8, 8, 5, 0)); // bad jaw offset periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 0)); + Quotes.ToAlligator(13, 0)); // bad teeth offset periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 8, 0)); + Quotes.ToAlligator(13, 8, 8, 0)); // bad lips offset periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 8, 5, 5, 0)); + Quotes.ToAlligator(13, 8, 8, 5, 5, 0)); // bad jaw + offset periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 12, 11)); + Quotes.ToAlligator(13, 8, 12, 11)); // bad teeth + offset periods Assert.ThrowsException(() => - Quotes.GetAlligator(13, 8, 8, 5, 7, 7)); + Quotes.ToAlligator(13, 8, 8, 5, 7, 7)); } } diff --git a/tests/indicators/a-d/Alligator/Alligator.StreamHub.Tests.cs b/tests/indicators/a-d/Alligator/Alligator.StreamHub.Tests.cs index bfe92a4e1..22a33b156 100644 --- a/tests/indicators/a-d/Alligator/Alligator.StreamHub.Tests.cs +++ b/tests/indicators/a-d/Alligator/Alligator.StreamHub.Tests.cs @@ -57,7 +57,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetAlligator(); + .ToAlligator(); // assert, should equal series streamList.Should().HaveCount(length - 1); @@ -118,7 +118,7 @@ IReadOnlyList streamList IReadOnlyList seriesList = quotesList .ToSma(10) - .GetAlligator(); + .ToAlligator(); // assert, should equal series streamList.Should().HaveCount(length - 1); diff --git a/tests/indicators/a-d/Alma/Alma.StaticSeries.Tests.cs b/tests/indicators/a-d/Alma/Alma.StaticSeries.Tests.cs index de8e61331..d9ccb1884 100644 --- a/tests/indicators/a-d/Alma/Alma.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Alma/Alma.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() double sigma = 6; IReadOnlyList results = Quotes - .GetAlma(lookbackPeriods, offset, sigma); + .ToAlma(lookbackPeriods, offset, sigma); // proper quantities Assert.AreEqual(502, results.Count); @@ -42,7 +42,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetAlma(10); + .ToAlma(10); Assert.AreEqual(502, results.Count); Assert.AreEqual(493, results.Count(x => x.Alma != null)); @@ -56,7 +56,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetAlma(10); + .ToAlma(10); Assert.AreEqual(502, results.Count); Assert.AreEqual(492, results.Count(x => x.Alma != null)); @@ -70,7 +70,7 @@ public void Chainor() double sigma = 6; IReadOnlyList results = Quotes - .GetAlma(lookbackPeriods, offset, sigma) + .ToAlma(lookbackPeriods, offset, sigma) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -81,12 +81,12 @@ public void Chainor() public void NaN() { IReadOnlyList r1 - = Data.GetBtcUsdNan().GetAlma(); + = Data.GetBtcUsdNan().ToAlma(); Assert.AreEqual(0, r1.Count(x => x.Alma is double.NaN)); IReadOnlyList r2 - = Data.GetBtcUsdNan().GetAlma(20); + = Data.GetBtcUsdNan().ToAlma(20); Assert.AreEqual(0, r2.Count(x => x.Alma is double.NaN)); } @@ -94,7 +94,7 @@ IReadOnlyList r2 [TestMethod] public override void BadData() { - IReadOnlyList r = BadQuotes.GetAlma(14, 0.5, 3); + IReadOnlyList r = BadQuotes.ToAlma(14, 0.5, 3); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Alma is double.NaN)); @@ -103,11 +103,11 @@ public override void BadData() [TestMethod] public override void NoQuotes() { - IReadOnlyList r0 = Noquotes.GetAlma(); + IReadOnlyList r0 = Noquotes.ToAlma(); Assert.AreEqual(0, r0.Count); - IReadOnlyList r1 = Onequote.GetAlma(); + IReadOnlyList r1 = Onequote.ToAlma(); Assert.AreEqual(1, r1.Count); } @@ -116,7 +116,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetAlma(10) + .ToAlma(10) .RemoveWarmupPeriods(); // assertions @@ -131,14 +131,14 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetAlma(0, 1, 5)); + Quotes.ToAlma(0, 1, 5)); // bad offset Assert.ThrowsException(() => - Quotes.GetAlma(15, 1.1, 3)); + Quotes.ToAlma(15, 1.1, 3)); // bad sigma Assert.ThrowsException(() => - Quotes.GetAlma(10, 0.5, 0)); + Quotes.ToAlma(10, 0.5, 0)); } } diff --git a/tests/indicators/a-d/Aroon/Aroon.StaticSeries.Tests.cs b/tests/indicators/a-d/Aroon/Aroon.StaticSeries.Tests.cs index 79e77cc5b..db6dcba18 100644 --- a/tests/indicators/a-d/Aroon/Aroon.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Aroon/Aroon.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Aroon : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetAroon(); + .ToAroon(); // proper quantities Assert.AreEqual(502, results.Count); @@ -46,7 +46,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetAroon() + .ToAroon() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -57,7 +57,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetAroon(20); + .ToAroon(20); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Oscillator is double.NaN)); @@ -67,12 +67,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetAroon(); + .ToAroon(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetAroon(); + .ToAroon(); Assert.AreEqual(1, r1.Count); } @@ -81,7 +81,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetAroon() + .ToAroon() .RemoveWarmupPeriods(); // assertions @@ -97,5 +97,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetAroon(0)); + => Quotes.ToAroon(0)); } diff --git a/tests/indicators/a-d/Atr/Atr.StaticSeries.Tests.cs b/tests/indicators/a-d/Atr/Atr.StaticSeries.Tests.cs index 8e7fbab50..0682f0fc3 100644 --- a/tests/indicators/a-d/Atr/Atr.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Atr/Atr.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Atr : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetAtr(); + .ToAtr(); // proper quantities Assert.AreEqual(502, results.Count); @@ -44,10 +44,10 @@ public override void Standard() public void MatchingTrueRange() { IReadOnlyList resultsAtr = Quotes - .GetAtr(14); + .ToAtr(14); IReadOnlyList resultsTr = Quotes - .GetTr(); + .ToTr(); for (int i = 0; i < Quotes.Count; i++) { @@ -65,7 +65,7 @@ public void MatchingTrueRange() public void Chainor() { IReadOnlyList results = Quotes - .GetAtr(10) + .ToAtr(10) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -76,7 +76,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetAtr(20); + .ToAtr(20); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Atr is double.NaN)); @@ -86,12 +86,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetAtr(); + .ToAtr(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetAtr(); + .ToAtr(); Assert.AreEqual(1, r1.Count); } @@ -100,7 +100,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetAtr() + .ToAtr() .RemoveWarmupPeriods(); // assertions @@ -116,5 +116,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() => - Quotes.GetAtr(1)); + Quotes.ToAtr(1)); } diff --git a/tests/indicators/a-d/Atr/Atr.StreamHub.Tests.cs b/tests/indicators/a-d/Atr/Atr.StreamHub.Tests.cs index ba3ca5f7c..ced05e39e 100644 --- a/tests/indicators/a-d/Atr/Atr.StreamHub.Tests.cs +++ b/tests/indicators/a-d/Atr/Atr.StreamHub.Tests.cs @@ -56,7 +56,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetAtr(14); + .ToAtr(14); // assert, should equal series streamList.Should().HaveCount(length - 1); @@ -102,7 +102,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetAtr(14) + .ToAtr(14) .ToSma(smaPeriods); // assert, should equal series diff --git a/tests/indicators/a-d/AtrStop/AtrStop.StaticSeries.Tests.cs b/tests/indicators/a-d/AtrStop/AtrStop.StaticSeries.Tests.cs index d51d939dc..091b89486 100644 --- a/tests/indicators/a-d/AtrStop/AtrStop.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/AtrStop/AtrStop.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() double multiplier = 3; IReadOnlyList results = Quotes - .GetAtrStop(lookbackPeriods, multiplier); + .ToAtrStop(lookbackPeriods, multiplier); // proper quantities Assert.AreEqual(502, results.Count); @@ -55,7 +55,7 @@ public void HighLow() double multiplier = 3; IReadOnlyList results = Quotes - .GetAtrStop(lookbackPeriods, multiplier, EndType.HighLow); + .ToAtrStop(lookbackPeriods, multiplier, EndType.HighLow); // proper quantities Assert.AreEqual(502, results.Count); @@ -97,7 +97,7 @@ public void HighLow() public override void BadData() { IReadOnlyList r = BadQuotes - .GetAtrStop(7); + .ToAtrStop(7); Assert.AreEqual(502, r.Count); } @@ -106,12 +106,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetAtrStop(); + .ToAtrStop(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetAtrStop(); + .ToAtrStop(); Assert.AreEqual(1, r1.Count); } @@ -123,7 +123,7 @@ public void Condense() double multiplier = 3; IReadOnlyList results = Quotes - .GetAtrStop(lookbackPeriods, multiplier) + .ToAtrStop(lookbackPeriods, multiplier) .Condense(); // assertions @@ -142,7 +142,7 @@ public void Removed() double multiplier = 3; IReadOnlyList results = Quotes - .GetAtrStop(lookbackPeriods, multiplier) + .ToAtrStop(lookbackPeriods, multiplier) .RemoveWarmupPeriods(); // assertions @@ -159,10 +159,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() - => Quotes.GetAtrStop(1)); + => Quotes.ToAtrStop(1)); // bad multiplier Assert.ThrowsException(() - => Quotes.GetAtrStop(7, 0)); + => Quotes.ToAtrStop(7, 0)); } } diff --git a/tests/indicators/a-d/AtrStop/AtrStop.StreamHub.Tests.cs b/tests/indicators/a-d/AtrStop/AtrStop.StreamHub.Tests.cs index 8beda6360..b36b6141d 100644 --- a/tests/indicators/a-d/AtrStop/AtrStop.StreamHub.Tests.cs +++ b/tests/indicators/a-d/AtrStop/AtrStop.StreamHub.Tests.cs @@ -57,7 +57,7 @@ IReadOnlyList streamList // time-series, for comparison IEnumerable seriesList = quotesList - .GetAtrStop(); + .ToAtrStop(); // assert, should equal series streamList.Should().HaveCount(length - 1); @@ -89,7 +89,7 @@ IReadOnlyList streamList // time-series, for comparison IEnumerable seriesList = Quotes - .GetAtrStop(endType: EndType.HighLow); + .ToAtrStop(endType: EndType.HighLow); // assert, should equal series streamList.Should().HaveCount(Quotes.Count); diff --git a/tests/indicators/a-d/Awesome/Awesome.StaticSeries.Tests.cs b/tests/indicators/a-d/Awesome/Awesome.StaticSeries.Tests.cs index 49eab3994..92982f51e 100644 --- a/tests/indicators/a-d/Awesome/Awesome.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Awesome/Awesome.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Awesome : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetAwesome(); + .ToAwesome(); // proper quantities Assert.AreEqual(502, results.Count); @@ -36,7 +36,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetAwesome(); + .ToAwesome(); Assert.AreEqual(502, results.Count); Assert.AreEqual(469, results.Count(x => x.Oscillator != null)); @@ -47,7 +47,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetAwesome(); + .ToAwesome(); Assert.AreEqual(502, results.Count); Assert.AreEqual(468, results.Count(x => x.Oscillator != null)); @@ -57,7 +57,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetAwesome() + .ToAwesome() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -68,7 +68,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetAwesome(); + .ToAwesome(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Oscillator is double.NaN)); @@ -78,12 +78,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetAwesome(); + .ToAwesome(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetAwesome(); + .ToAwesome(); Assert.AreEqual(1, r1.Count); } @@ -92,7 +92,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetAwesome() + .ToAwesome() .RemoveWarmupPeriods(); // assertions @@ -108,10 +108,10 @@ public void Exceptions() { // bad fast period Assert.ThrowsException(() => - Quotes.GetAwesome(0)); + Quotes.ToAwesome(0)); // bad slow period Assert.ThrowsException(() => - Quotes.GetAwesome(25, 25)); + Quotes.ToAwesome(25, 25)); } } diff --git a/tests/indicators/a-d/Beta/Beta.StaticSeries.Tests.cs b/tests/indicators/a-d/Beta/Beta.StaticSeries.Tests.cs index cfced403d..f2797f1c7 100644 --- a/tests/indicators/a-d/Beta/Beta.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Beta/Beta.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Beta : StaticSeriesTestBase public void All() { IReadOnlyList results = OtherQuotes - .GetBeta(Quotes, 20, BetaType.All); + .ToBeta(Quotes, 20, BetaType.All); // proper quantities Assert.AreEqual(502, results.Count); @@ -51,7 +51,7 @@ public void All() public override void Standard() { IReadOnlyList results = OtherQuotes - .GetBeta(Quotes, 20); + .ToBeta(Quotes, 20); // proper quantities Assert.AreEqual(502, results.Count); @@ -66,7 +66,7 @@ public override void Standard() public void Up() { IReadOnlyList results = OtherQuotes - .GetBeta(Quotes, 20, BetaType.Up); + .ToBeta(Quotes, 20, BetaType.Up); // proper quantities Assert.AreEqual(502, results.Count); @@ -81,7 +81,7 @@ public void Up() public void Down() { IReadOnlyList results = OtherQuotes - .GetBeta(Quotes, 20, BetaType.Down); + .ToBeta(Quotes, 20, BetaType.Down); // proper quantities Assert.AreEqual(502, results.Count); @@ -97,7 +97,7 @@ public void UseReusable() { IReadOnlyList results = OtherQuotes .Use(CandlePart.Close) - .GetBeta(Quotes.Use(CandlePart.Close), 20); + .ToBeta(Quotes.Use(CandlePart.Close), 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Beta != null)); @@ -107,7 +107,7 @@ public void UseReusable() public void Chainor() { IReadOnlyList results = OtherQuotes - .GetBeta(Quotes, 20) + .ToBeta(Quotes, 20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -119,7 +119,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetBeta(OtherQuotes.ToSma(2), 20); + .ToBeta(OtherQuotes.ToSma(2), 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Beta != null)); @@ -130,19 +130,19 @@ public void Chainee() public override void BadData() { IReadOnlyList r1 = BadQuotes - .GetBeta(BadQuotes, 15); + .ToBeta(BadQuotes, 15); Assert.AreEqual(502, r1.Count); Assert.AreEqual(0, r1.Count(x => x.Beta is double.NaN)); IReadOnlyList r2 = BadQuotes - .GetBeta(BadQuotes, 15, BetaType.Up); + .ToBeta(BadQuotes, 15, BetaType.Up); Assert.AreEqual(502, r2.Count); Assert.AreEqual(0, r2.Count(x => x.BetaUp is double.NaN)); IReadOnlyList r3 = BadQuotes - .GetBeta(BadQuotes, 15, BetaType.Down); + .ToBeta(BadQuotes, 15, BetaType.Down); Assert.AreEqual(502, r3.Count); Assert.AreEqual(0, r3.Count(x => x.BetaDown is double.NaN)); @@ -152,7 +152,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetBeta(BigQuotes, 150, BetaType.All); + .ToBeta(BigQuotes, 150, BetaType.All); Assert.AreEqual(1246, r.Count); } @@ -173,7 +173,7 @@ public void BetaMsft() IReadOnlyList results = evalQuotes .Aggregate(PeriodSize.Month) - .GetBeta(mktQuotes.Aggregate(PeriodSize.Month), 60); + .ToBeta(mktQuotes.Aggregate(PeriodSize.Month), 60); Assert.AreEqual(0.91, results[385].Beta.Round(2)); } @@ -182,7 +182,7 @@ public void BetaMsft() public void Removed() { IReadOnlyList results = OtherQuotes - .GetBeta(Quotes, 20) + .ToBeta(Quotes, 20) .RemoveWarmupPeriods(); // assertions @@ -197,7 +197,7 @@ public void SameSame() { // Beta should be 1 if evaluating against self IReadOnlyList results = Quotes - .GetBeta(Quotes, 20); + .ToBeta(Quotes, 20); // proper quantities Assert.AreEqual(502, results.Count); @@ -212,12 +212,12 @@ public void SameSame() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetBeta(Noquotes, 5); + .ToBeta(Noquotes, 5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetBeta(Onequote, 5); + .ToBeta(Onequote, 5); Assert.AreEqual(1, r1.Count); } @@ -252,7 +252,7 @@ public void NoMatch() ]; Assert.ThrowsException(() - => quoteA.GetBeta(quoteB, 3)); + => quoteA.ToBeta(quoteB, 3)); } [TestMethod] @@ -260,12 +260,12 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() - => Quotes.GetBeta(OtherQuotes, 0)); + => Quotes.ToBeta(OtherQuotes, 0)); // bad evaluation quotes IReadOnlyList eval = Data.GetCompare(300).ToList(); Assert.ThrowsException(() - => Quotes.GetBeta(eval, 30)); + => Quotes.ToBeta(eval, 30)); } } diff --git a/tests/indicators/a-d/BollingerBands/BollingerBands.StaticSeries.Tests.cs b/tests/indicators/a-d/BollingerBands/BollingerBands.StaticSeries.Tests.cs index b8e028e06..a0fa51e21 100644 --- a/tests/indicators/a-d/BollingerBands/BollingerBands.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/BollingerBands/BollingerBands.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class BollingerBands : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = - Quotes.GetBollingerBands(); + Quotes.ToBollingerBands(); // proper quantities Assert.AreEqual(502, results.Count); @@ -41,7 +41,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetBollingerBands(); + .ToBollingerBands(); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Sma != null)); @@ -52,7 +52,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetBollingerBands(); + .ToBollingerBands(); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.UpperBand != null)); @@ -62,7 +62,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetBollingerBands() + .ToBollingerBands() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -73,7 +73,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetBollingerBands(15, 3); + .ToBollingerBands(15, 3); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.UpperBand is double.NaN)); @@ -83,12 +83,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetBollingerBands(); + .ToBollingerBands(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetBollingerBands(); + .ToBollingerBands(); Assert.AreEqual(1, r1.Count); } @@ -97,7 +97,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetBollingerBands() + .ToBollingerBands() .RemoveWarmupPeriods(); // assertions @@ -117,10 +117,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetBollingerBands(1)); + Quotes.ToBollingerBands(1)); // bad standard deviation Assert.ThrowsException(() => - Quotes.GetBollingerBands(2, 0)); + Quotes.ToBollingerBands(2, 0)); } } diff --git a/tests/indicators/a-d/Bop/Bop.StaticSeries.Tests.cs b/tests/indicators/a-d/Bop/Bop.StaticSeries.Tests.cs index 10ea4d8e9..cb297e871 100644 --- a/tests/indicators/a-d/Bop/Bop.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Bop/Bop.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Bop : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetBop(); + .ToBop(); // proper quantities Assert.AreEqual(502, results.Count); @@ -34,7 +34,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetBop() + .ToBop() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -45,7 +45,7 @@ public void Chainor() public void NaN() { IEnumerable r = Data.GetBtcUsdNan() - .GetBop(50); + .ToBop(50); Assert.AreEqual(0, r.Count(x => x.Bop is double.NaN)); } @@ -54,7 +54,7 @@ public void NaN() public override void BadData() { IReadOnlyList r = BadQuotes - .GetBop(); + .ToBop(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Bop is double.NaN)); @@ -64,11 +64,11 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetBop(); + .ToBop(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetBop(); + .ToBop(); Assert.AreEqual(1, r1.Count); } @@ -76,7 +76,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetBop() + .ToBop() .RemoveWarmupPeriods(); // assertions @@ -90,5 +90,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetBop(0)); + => Quotes.ToBop(0)); } diff --git a/tests/indicators/a-d/Cci/Cci.StaticSeries.Tests.cs b/tests/indicators/a-d/Cci/Cci.StaticSeries.Tests.cs index 2807b47c7..c4550ed6a 100644 --- a/tests/indicators/a-d/Cci/Cci.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Cci/Cci.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Cci : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetCci(); + .ToCci(); // proper quantities Assert.AreEqual(502, results.Count); @@ -22,7 +22,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetCci() + .ToCci() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -33,7 +33,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetCci(15); + .ToCci(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Cci is double.NaN)); @@ -43,12 +43,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetCci(); + .ToCci(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetCci(); + .ToCci(); Assert.AreEqual(1, r1.Count); } @@ -57,7 +57,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetCci() + .ToCci() .RemoveWarmupPeriods(); // assertions @@ -71,5 +71,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetCci(0)); + => Quotes.ToCci(0)); } diff --git a/tests/indicators/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.Tests.cs b/tests/indicators/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.Tests.cs index a9cc6474f..613c34cb6 100644 --- a/tests/indicators/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/ChaikinOsc/ChaikinOsc.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() int slowPeriods = 10; IReadOnlyList results = Quotes - .GetChaikinOsc(fastPeriods, slowPeriods); + .ToChaikinOsc(fastPeriods, slowPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -28,7 +28,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetChaikinOsc() + .ToChaikinOsc() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -39,7 +39,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetChaikinOsc(5, 15); + .ToChaikinOsc(5, 15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Oscillator is double.NaN)); @@ -49,12 +49,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetChaikinOsc(); + .ToChaikinOsc(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetChaikinOsc(); + .ToChaikinOsc(); Assert.AreEqual(1, r1.Count); } @@ -66,7 +66,7 @@ public void Removed() int slowPeriods = 10; IReadOnlyList results = Quotes - .GetChaikinOsc(fastPeriods, slowPeriods) + .ToChaikinOsc(fastPeriods, slowPeriods) .RemoveWarmupPeriods(); // assertions @@ -84,10 +84,10 @@ public void Exceptions() { // bad fast lookback Assert.ThrowsException(() => - Quotes.GetChaikinOsc(0)); + Quotes.ToChaikinOsc(0)); // bad slow lookback Assert.ThrowsException(() => - Quotes.GetChaikinOsc(10, 5)); + Quotes.ToChaikinOsc(10, 5)); } } diff --git a/tests/indicators/a-d/Chandelier/Chandelier.StaticSeries.Tests.cs b/tests/indicators/a-d/Chandelier/Chandelier.StaticSeries.Tests.cs index 727f00fdb..92b8663d0 100644 --- a/tests/indicators/a-d/Chandelier/Chandelier.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Chandelier/Chandelier.StaticSeries.Tests.cs @@ -9,7 +9,7 @@ public override void Standard() int lookbackPeriods = 22; IReadOnlyList longResult = - Quotes.GetChandelier(lookbackPeriods); + Quotes.ToChandelier(lookbackPeriods); // proper quantities Assert.AreEqual(502, longResult.Count); @@ -24,7 +24,7 @@ public override void Standard() // short IReadOnlyList shortResult = - Quotes.GetChandelier(lookbackPeriods, 3, ChandelierType.Short); + Quotes.ToChandelier(lookbackPeriods, 3, ChandelierType.Short); ChandelierResult c = shortResult[501]; Assert.AreEqual(246.4240, c.ChandelierExit.Round(4)); @@ -34,7 +34,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetChandelier() + .ToChandelier() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -45,7 +45,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetChandelier(15, 2); + .ToChandelier(15, 2); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.ChandelierExit is double.NaN)); @@ -55,12 +55,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetChandelier(); + .ToChandelier(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetChandelier(); + .ToChandelier(); Assert.AreEqual(1, r1.Count); } @@ -69,7 +69,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetChandelier() + .ToChandelier() .RemoveWarmupPeriods(); // assertions @@ -84,14 +84,14 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetChandelier(0)); + Quotes.ToChandelier(0)); // bad multiplier Assert.ThrowsException(() => - Quotes.GetChandelier(25, 0)); + Quotes.ToChandelier(25, 0)); // bad type Assert.ThrowsException(() => - Quotes.GetChandelier(25, 2, (ChandelierType)int.MaxValue)); + Quotes.ToChandelier(25, 2, (ChandelierType)int.MaxValue)); } } diff --git a/tests/indicators/a-d/Chop/Chop.StaticSeries.Tests.cs b/tests/indicators/a-d/Chop/Chop.StaticSeries.Tests.cs index 5610f776f..0563157d0 100644 --- a/tests/indicators/a-d/Chop/Chop.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Chop/Chop.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Chop : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetChop(); + .ToChop(); // proper quantities Assert.AreEqual(502, results.Count); @@ -31,7 +31,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetChop() + .ToChop() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -43,7 +43,7 @@ public void SmallLookback() { int lookbackPeriods = 2; IReadOnlyList results = Quotes - .GetChop(lookbackPeriods); + .ToChop(lookbackPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -54,7 +54,7 @@ public void SmallLookback() public override void BadData() { IReadOnlyList r = BadQuotes - .GetChop(20); + .ToChop(20); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Chop is double.NaN)); @@ -64,12 +64,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetChop(); + .ToChop(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetChop(); + .ToChop(); Assert.AreEqual(1, r1.Count); } @@ -78,7 +78,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetChop() + .ToChop() .RemoveWarmupPeriods(); // assertions @@ -92,5 +92,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetChop(1)); + => Quotes.ToChop(1)); } diff --git a/tests/indicators/a-d/Cmf/Cmf.StaticSeries.Tests.cs b/tests/indicators/a-d/Cmf/Cmf.StaticSeries.Tests.cs index 30120cfcb..f6c5814c0 100644 --- a/tests/indicators/a-d/Cmf/Cmf.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Cmf/Cmf.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Cmf : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetCmf(); + .ToCmf(); // proper quantities Assert.AreEqual(502, results.Count); @@ -34,7 +34,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetCmf() + .ToCmf() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -45,7 +45,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetCmf(15); + .ToCmf(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Cmf is double.NaN)); @@ -55,7 +55,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetCmf(150); + .ToCmf(150); Assert.AreEqual(1246, r.Count); } @@ -64,12 +64,12 @@ public void BigData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetCmf(); + .ToCmf(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetCmf(); + .ToCmf(); Assert.AreEqual(1, r1.Count); } @@ -78,7 +78,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetCmf() + .ToCmf() .RemoveWarmupPeriods(); // assertions @@ -94,5 +94,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetCmf(0)); + => Quotes.ToCmf(0)); } diff --git a/tests/indicators/a-d/Cmo/Cmo.StaticSeries.Tests.cs b/tests/indicators/a-d/Cmo/Cmo.StaticSeries.Tests.cs index ad5aa350a..37ca7fa75 100644 --- a/tests/indicators/a-d/Cmo/Cmo.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Cmo/Cmo.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Cmo : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetCmo(14); + .ToCmo(14); // proper quantities Assert.AreEqual(502, results.Count); @@ -32,7 +32,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetCmo(14); + .ToCmo(14); Assert.AreEqual(502, results.Count); Assert.AreEqual(488, results.Count(x => x.Cmo != null)); @@ -43,7 +43,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetCmo(20); + .ToCmo(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Cmo != null)); @@ -53,7 +53,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetCmo(20) + .ToCmo(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -64,7 +64,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetCmo(35); + .ToCmo(35); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Cmo is double.NaN)); @@ -74,12 +74,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetCmo(5); + .ToCmo(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetCmo(5); + .ToCmo(5); Assert.AreEqual(1, r1.Count); } @@ -88,7 +88,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetCmo(14) + .ToCmo(14) .RemoveWarmupPeriods(); // assertions @@ -102,5 +102,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetCmo(0)); + => Quotes.ToCmo(0)); } diff --git a/tests/indicators/a-d/ConnorsRsi/ConnorsRsi.StaticSeries.Tests.cs b/tests/indicators/a-d/ConnorsRsi/ConnorsRsi.StaticSeries.Tests.cs index 5d8bd2bd3..3e1c6e07c 100644 --- a/tests/indicators/a-d/ConnorsRsi/ConnorsRsi.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/ConnorsRsi/ConnorsRsi.StaticSeries.Tests.cs @@ -12,7 +12,7 @@ public override void Standard() int startPeriod = Math.Max(rsiPeriods, Math.Max(streakPeriods, rankPeriods)) + 2; IReadOnlyList results1 = Quotes - .GetConnorsRsi(rsiPeriods, streakPeriods, rankPeriods); + .ToConnorsRsi(rsiPeriods, streakPeriods, rankPeriods); // proper quantities Assert.AreEqual(502, results1.Count); @@ -26,7 +26,7 @@ public override void Standard() Assert.AreEqual(74.7662, r1.ConnorsRsi.Round(4)); // different parameters - IReadOnlyList results2 = Quotes.GetConnorsRsi(14, 20, 10).ToList(); + IReadOnlyList results2 = Quotes.ToConnorsRsi(14, 20, 10).ToList(); ConnorsRsiResult r2 = results2[501]; Assert.AreEqual(42.0773, r2.Rsi.Round(4)); Assert.AreEqual(52.7386, r2.RsiStreak.Round(4)); @@ -39,7 +39,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetConnorsRsi(); + .ToConnorsRsi(); Assert.AreEqual(502, results.Count); Assert.AreEqual(401, results.Count(x => x.ConnorsRsi != null)); @@ -50,7 +50,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetConnorsRsi(); + .ToConnorsRsi(); Assert.AreEqual(502, results.Count); Assert.AreEqual(400, results.Count(x => x.ConnorsRsi != null)); @@ -60,7 +60,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetConnorsRsi() + .ToConnorsRsi() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -71,7 +71,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetConnorsRsi(4, 3, 25); + .ToConnorsRsi(4, 3, 25); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Rsi is double.NaN)); @@ -81,12 +81,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetConnorsRsi(); + .ToConnorsRsi(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetConnorsRsi(); + .ToConnorsRsi(); Assert.AreEqual(1, r1.Count); } @@ -102,7 +102,7 @@ public void Removed() int removePeriods = Math.Max(rsiPeriods, Math.Max(streakPeriods, rankPeriods)) + 2; IReadOnlyList results = Quotes - .GetConnorsRsi(rsiPeriods, streakPeriods, rankPeriods) + .ToConnorsRsi(rsiPeriods, streakPeriods, rankPeriods) .RemoveWarmupPeriods(); // assertions @@ -120,14 +120,14 @@ public void Exceptions() { // bad RSI period Assert.ThrowsException(() => - Quotes.GetConnorsRsi(1)); + Quotes.ToConnorsRsi(1)); // bad Streak period Assert.ThrowsException(() => - Quotes.GetConnorsRsi(3, 1)); + Quotes.ToConnorsRsi(3, 1)); // bad Rank period Assert.ThrowsException(() => - Quotes.GetConnorsRsi(3, 2, 1)); + Quotes.ToConnorsRsi(3, 2, 1)); } } diff --git a/tests/indicators/a-d/Correlation/Correlation.StaticSeries.Tests.cs b/tests/indicators/a-d/Correlation/Correlation.StaticSeries.Tests.cs index 3a203c39b..07df155fd 100644 --- a/tests/indicators/a-d/Correlation/Correlation.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Correlation/Correlation.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Correlation : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetCorrelation(OtherQuotes, 20); + .ToCorrelation(OtherQuotes, 20); // proper quantities // should always be the same number of results as there is quotes @@ -37,7 +37,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetCorrelation(OtherQuotes.Use(CandlePart.Close), 20); + .ToCorrelation(OtherQuotes.Use(CandlePart.Close), 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Correlation != null)); @@ -47,7 +47,7 @@ public void UseReusable() public void Chainor() { IReadOnlyList results = Quotes - .GetCorrelation(OtherQuotes, 20) + .ToCorrelation(OtherQuotes, 20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -59,7 +59,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetCorrelation(OtherQuotes.ToSma(2), 20); + .ToCorrelation(OtherQuotes.ToSma(2), 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Correlation != null)); @@ -70,7 +70,7 @@ public void Chainee() public override void BadData() { IReadOnlyList r = BadQuotes - .GetCorrelation(BadQuotes, 15); + .ToCorrelation(BadQuotes, 15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Correlation is double.NaN)); @@ -80,7 +80,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetCorrelation(BigQuotes, 150); + .ToCorrelation(BigQuotes, 150); Assert.AreEqual(1246, r.Count); } @@ -89,12 +89,12 @@ public void BigData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetCorrelation(Noquotes, 10); + .ToCorrelation(Noquotes, 10); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetCorrelation(Onequote, 10); + .ToCorrelation(Onequote, 10); Assert.AreEqual(1, r1.Count); } @@ -103,7 +103,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetCorrelation(OtherQuotes, 20) + .ToCorrelation(OtherQuotes, 20) .RemoveWarmupPeriods(); // assertions @@ -119,15 +119,15 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetCorrelation(OtherQuotes, 0)); + Quotes.ToCorrelation(OtherQuotes, 0)); // bad eval quotes IEnumerable eval = Data.GetCompare(300); Assert.ThrowsException(() => - Quotes.GetCorrelation(eval, 30)); + Quotes.ToCorrelation(eval, 30)); // mismatched quotes Assert.ThrowsException(() => - MismatchQuotes.GetCorrelation(OtherQuotes, 20)); + MismatchQuotes.ToCorrelation(OtherQuotes, 20)); } } diff --git a/tests/indicators/a-d/Dema/Dema.StaticSeries.Tests.cs b/tests/indicators/a-d/Dema/Dema.StaticSeries.Tests.cs index 2ec06a281..b98a3b5f7 100644 --- a/tests/indicators/a-d/Dema/Dema.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Dema/Dema.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Dema : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetDema(20); + .ToDema(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -32,7 +32,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetDema(20); + .ToDema(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Dema != null)); @@ -43,7 +43,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetDema(20); + .ToDema(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Dema != null)); @@ -53,7 +53,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetDema(20) + .ToDema(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -64,7 +64,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetDema(15); + .ToDema(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Dema is double.NaN)); @@ -74,12 +74,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetDema(5); + .ToDema(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetDema(5); + .ToDema(5); Assert.AreEqual(1, r1.Count); } @@ -88,7 +88,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetDema(20) + .ToDema(20) .RemoveWarmupPeriods(); // assertions @@ -102,5 +102,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetDema(0)); + => Quotes.ToDema(0)); } diff --git a/tests/indicators/a-d/Doji/Doji.StaticSeries.Tests.cs b/tests/indicators/a-d/Doji/Doji.StaticSeries.Tests.cs index 0bbd6614a..6b0622535 100644 --- a/tests/indicators/a-d/Doji/Doji.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Doji/Doji.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Doji : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetDoji(); + .ToDoji(); // proper quantities Assert.AreEqual(502, results.Count); @@ -43,7 +43,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetDoji(); + .ToDoji(); Assert.AreEqual(502, r.Count); } @@ -52,12 +52,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetDoji(); + .ToDoji(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetDoji(); + .ToDoji(); Assert.AreEqual(1, r1.Count); } @@ -66,7 +66,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetDoji() + .ToDoji() .Condense(); Assert.AreEqual(112, results.Count); @@ -77,9 +77,9 @@ public void Exceptions() { // bad maximum change value Assert.ThrowsException(() => - Quotes.GetDoji(-0.00001)); + Quotes.ToDoji(-0.00001)); Assert.ThrowsException(() => - Quotes.GetDoji(0.50001)); + Quotes.ToDoji(0.50001)); } } diff --git a/tests/indicators/a-d/Donchian/Donchian.StaticSeries.Tests.cs b/tests/indicators/a-d/Donchian/Donchian.StaticSeries.Tests.cs index 362476c98..c16cee7b4 100644 --- a/tests/indicators/a-d/Donchian/Donchian.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Donchian/Donchian.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Donchian : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetDonchian(); + .ToDonchian(); // proper quantities Assert.AreEqual(502, results.Count); @@ -52,7 +52,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetDonchian(15); + .ToDonchian(15); Assert.AreEqual(502, r.Count); } @@ -61,12 +61,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetDonchian(); + .ToDonchian(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetDonchian(); + .ToDonchian(); Assert.AreEqual(1, r1.Count); } @@ -75,7 +75,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetDonchian() + .ToDonchian() .Condense(); // assertions @@ -92,7 +92,7 @@ public void Condense() public void Removed() { IReadOnlyList results = Quotes - .GetDonchian() + .ToDonchian() .RemoveWarmupPeriods(); // assertions @@ -109,5 +109,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetDonchian(0)); + => Quotes.ToDonchian(0)); } diff --git a/tests/indicators/a-d/Dpo/Dpo.StaticSeries.Tests.cs b/tests/indicators/a-d/Dpo/Dpo.StaticSeries.Tests.cs index 5694b4f84..f6a3c71b3 100644 --- a/tests/indicators/a-d/Dpo/Dpo.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Dpo/Dpo.StaticSeries.Tests.cs @@ -24,7 +24,7 @@ public override void Standard() } // calculate actual data - IReadOnlyList act = qot.GetDpo(14); + IReadOnlyList act = qot.ToDpo(14); // assertions Assert.AreEqual(exp.Count, act.Count); @@ -46,7 +46,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetDpo(14); + .ToDpo(14); Assert.AreEqual(502, results.Count); Assert.AreEqual(489, results.Count(x => x.Dpo != null)); @@ -57,7 +57,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetDpo(14); + .ToDpo(14); Assert.AreEqual(502, results.Count); Assert.AreEqual(488, results.Count(x => x.Dpo != null)); @@ -67,7 +67,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetDpo(14) + .ToDpo(14) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -78,7 +78,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetDpo(5); + .ToDpo(5); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Dpo is double.NaN)); @@ -88,12 +88,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetDpo(5); + .ToDpo(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetDpo(5); + .ToDpo(5); Assert.AreEqual(1, r1.Count); } @@ -102,5 +102,5 @@ public override void NoQuotes() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetDpo(0)); + => Quotes.ToDpo(0)); } diff --git a/tests/indicators/a-d/Dynamic/Dynamic.StaticSeries.Tests.cs b/tests/indicators/a-d/Dynamic/Dynamic.StaticSeries.Tests.cs index 5baf359bf..6f2a47247 100644 --- a/tests/indicators/a-d/Dynamic/Dynamic.StaticSeries.Tests.cs +++ b/tests/indicators/a-d/Dynamic/Dynamic.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class McGinleyDynamic : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetDynamic(14); + .ToDynamic(14); // assertions Assert.AreEqual(502, results.Count); @@ -32,7 +32,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetDynamic(20); + .ToDynamic(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(501, results.Count(x => x.Dynamic != null)); @@ -44,7 +44,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(10) - .GetDynamic(14); + .ToDynamic(14); Assert.AreEqual(502, results.Count); Assert.AreEqual(492, results.Count(x => x.Dynamic != null)); @@ -54,7 +54,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetDynamic(14) + .ToDynamic(14) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -65,7 +65,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetDynamic(15); + .ToDynamic(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Dynamic is double.NaN)); @@ -75,12 +75,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetDynamic(14); + .ToDynamic(14); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetDynamic(14); + .ToDynamic(14); Assert.AreEqual(1, r1.Count); } @@ -90,10 +90,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() - => Quotes.GetDynamic(0)); + => Quotes.ToDynamic(0)); // bad k-factor Assert.ThrowsException(() - => Quotes.GetDynamic(14, 0)); + => Quotes.ToDynamic(14, 0)); } } diff --git a/tests/indicators/e-k/ElderRay/ElderRay.StaticSeries.Tests.cs b/tests/indicators/e-k/ElderRay/ElderRay.StaticSeries.Tests.cs index 5f3d300eb..f857c4df9 100644 --- a/tests/indicators/e-k/ElderRay/ElderRay.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/ElderRay/ElderRay.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class ElderRay : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetElderRay(); + .ToElderRay(); // proper quantities Assert.AreEqual(502, results.Count); @@ -50,7 +50,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetElderRay() + .ToElderRay() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -61,7 +61,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetElderRay(); + .ToElderRay(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.BullPower is double.NaN)); @@ -71,12 +71,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetElderRay(); + .ToElderRay(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetElderRay(); + .ToElderRay(); Assert.AreEqual(1, r1.Count); } @@ -85,7 +85,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetElderRay() + .ToElderRay() .RemoveWarmupPeriods(); // assertions @@ -101,5 +101,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetElderRay(0)); + => Quotes.ToElderRay(0)); } diff --git a/tests/indicators/e-k/Ema/Ema.StaticSeries.Tests.cs b/tests/indicators/e-k/Ema/Ema.StaticSeries.Tests.cs index 71b1a5d69..39a670a7f 100644 --- a/tests/indicators/e-k/Ema/Ema.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Ema/Ema.StaticSeries.Tests.cs @@ -96,7 +96,7 @@ public void Chainor() public void ChaineeMore() { IReadOnlyList results = Quotes - .GetRsi() + .ToRsi() .ToEma(20); // assertions diff --git a/tests/indicators/e-k/Epma/Epma.StaticSeries.Tests.cs b/tests/indicators/e-k/Epma/Epma.StaticSeries.Tests.cs index d1d8fc1f0..6756a5159 100644 --- a/tests/indicators/e-k/Epma/Epma.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Epma/Epma.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Epma : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetEpma(20); + .ToEpma(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -35,7 +35,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetEpma(20); + .ToEpma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Epma != null)); @@ -46,7 +46,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetEpma(20); + .ToEpma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Epma != null)); @@ -56,7 +56,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetEpma(20) + .ToEpma(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -67,7 +67,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetEpma(15); + .ToEpma(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Epma is double.NaN)); @@ -77,12 +77,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetEpma(5); + .ToEpma(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetEpma(5); + .ToEpma(5); Assert.AreEqual(1, r1.Count); } @@ -91,7 +91,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetEpma(20) + .ToEpma(20) .RemoveWarmupPeriods(); // assertions @@ -105,5 +105,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetEpma(0)); + => Quotes.ToEpma(0)); } diff --git a/tests/indicators/e-k/Fcb/Fcb.StaticSeries.Tests.cs b/tests/indicators/e-k/Fcb/Fcb.StaticSeries.Tests.cs index 09ca48d44..e0742cacd 100644 --- a/tests/indicators/e-k/Fcb/Fcb.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Fcb/Fcb.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Fcb : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetFcb(); + .ToFcb(); // proper quantities Assert.AreEqual(502, results.Count); @@ -44,7 +44,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetFcb(); + .ToFcb(); Assert.AreEqual(502, r.Count); } @@ -53,12 +53,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetFcb(); + .ToFcb(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetFcb(); + .ToFcb(); Assert.AreEqual(1, r1.Count); } @@ -67,7 +67,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetFcb() + .ToFcb() .Condense(); // assertions @@ -82,7 +82,7 @@ public void Condense() public void Removed() { IReadOnlyList results = Quotes - .GetFcb() + .ToFcb() .RemoveWarmupPeriods(); // assertions @@ -97,5 +97,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetFcb(1)); + => Quotes.ToFcb(1)); } diff --git a/tests/indicators/e-k/FisherTransform/FisherTransform.StaticSeries.Tests.cs b/tests/indicators/e-k/FisherTransform/FisherTransform.StaticSeries.Tests.cs index c0649936e..e826b2b5d 100644 --- a/tests/indicators/e-k/FisherTransform/FisherTransform.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/FisherTransform/FisherTransform.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class FisherTransform : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetFisherTransform(); + .ToFisherTransform(); // proper quantities Assert.AreEqual(502, results.Count); @@ -50,7 +50,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetFisherTransform(); + .ToFisherTransform(); Assert.AreEqual(502, results.Count); Assert.AreEqual(501, results.Count(x => x.Fisher != 0)); @@ -61,7 +61,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetFisherTransform(); + .ToFisherTransform(); Assert.AreEqual(502, results.Count); Assert.AreEqual(501, results.Count(x => x.Fisher != 0)); @@ -71,7 +71,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetFisherTransform() + .ToFisherTransform() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -82,7 +82,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetFisherTransform(9); + .ToFisherTransform(9); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Fisher is double.NaN)); @@ -92,12 +92,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetFisherTransform(); + .ToFisherTransform(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetFisherTransform(); + .ToFisherTransform(); Assert.AreEqual(1, r1.Count); } @@ -106,5 +106,5 @@ public override void NoQuotes() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetFisherTransform(0)); + => Quotes.ToFisherTransform(0)); } diff --git a/tests/indicators/e-k/ForceIndex/ForceIndex.StaticSeries.Tests.cs b/tests/indicators/e-k/ForceIndex/ForceIndex.StaticSeries.Tests.cs index a5d6d6e64..0e9d54eed 100644 --- a/tests/indicators/e-k/ForceIndex/ForceIndex.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/ForceIndex/ForceIndex.StaticSeries.Tests.cs @@ -6,7 +6,7 @@ public class ForceIndex : StaticSeriesTestBase [TestMethod] public override void Standard() { - IReadOnlyList r = Quotes.GetForceIndex(13).ToList(); + IReadOnlyList r = Quotes.ToForceIndex(13).ToList(); // proper quantities Assert.AreEqual(502, r.Count); @@ -26,7 +26,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetForceIndex(13) + .ToForceIndex(13) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -37,7 +37,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetForceIndex(); + .ToForceIndex(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.ForceIndex is double.NaN)); @@ -47,12 +47,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetForceIndex(5); + .ToForceIndex(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetForceIndex(5); + .ToForceIndex(5); Assert.AreEqual(1, r1.Count); } @@ -61,7 +61,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetForceIndex(13) + .ToForceIndex(13) .RemoveWarmupPeriods(); // assertions @@ -75,5 +75,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetForceIndex(0)); + => Quotes.ToForceIndex(0)); } diff --git a/tests/indicators/e-k/Fractal/Fractal.StaticSeries.Tests.cs b/tests/indicators/e-k/Fractal/Fractal.StaticSeries.Tests.cs index 9f9dfc51c..20e7a52dc 100644 --- a/tests/indicators/e-k/Fractal/Fractal.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Fractal/Fractal.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Fractal : StaticSeriesTestBase public override void Standard() // Span 2 { IReadOnlyList results = Quotes - .GetFractal(); + .ToFractal(); // proper quantities Assert.AreEqual(502, results.Count); @@ -81,7 +81,7 @@ public void StandardSpan4() public override void BadData() { IReadOnlyList r = BadQuotes - .GetFractal(); + .ToFractal(); Assert.AreEqual(502, r.Count); } @@ -90,12 +90,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetFractal(); + .ToFractal(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetFractal(); + .ToFractal(); Assert.AreEqual(1, r1.Count); } @@ -104,7 +104,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetFractal() + .ToFractal() .Condense(); Assert.AreEqual(129, results.Count); @@ -114,5 +114,5 @@ public void Condense() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetFractal(1)); + => Quotes.ToFractal(1)); } diff --git a/tests/indicators/e-k/Gator/Gator.StaticSeries.Tests.cs b/tests/indicators/e-k/Gator/Gator.StaticSeries.Tests.cs index fff0d1027..994f1026a 100644 --- a/tests/indicators/e-k/Gator/Gator.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Gator/Gator.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Gator : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetGator(); + .ToGator(); // proper quantities Assert.AreEqual(502, results.Count); @@ -76,7 +76,7 @@ public override void Standard() public void FromAlligator() { IReadOnlyList results = Quotes - .GetAlligator() + .ToAlligator() .GetGator(); // proper quantities @@ -147,7 +147,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetGator(); + .ToGator(); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Upper != null)); @@ -158,7 +158,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetGator(); + .ToGator(); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Upper != null)); @@ -168,7 +168,7 @@ public void Chainee() public override void BadData() { IReadOnlyList r = BadQuotes - .GetGator(); + .ToGator(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Upper is double.NaN)); @@ -178,12 +178,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetGator(); + .ToGator(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetGator(); + .ToGator(); Assert.AreEqual(1, r1.Count); } @@ -192,7 +192,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetGator() + .ToGator() .Condense(); // assertions @@ -209,7 +209,7 @@ public void Condense() public void Removed() { IReadOnlyList results = Quotes - .GetGator() + .ToGator() .RemoveWarmupPeriods(); // assertions diff --git a/tests/indicators/e-k/HeikinAshi/HeikinAshi.StaticSeries.Tests.cs b/tests/indicators/e-k/HeikinAshi/HeikinAshi.StaticSeries.Tests.cs index 0c6e0e1e3..6d452026e 100644 --- a/tests/indicators/e-k/HeikinAshi/HeikinAshi.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/HeikinAshi/HeikinAshi.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class HeikinAshi : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetHeikinAshi(); + .ToHeikinAshi(); // proper quantities Assert.AreEqual(502, results.Count); @@ -24,7 +24,7 @@ public override void Standard() [TestMethod] public void UseAsQuotes() { - IReadOnlyList haQuotes = Quotes.GetHeikinAshi(); + IReadOnlyList haQuotes = Quotes.ToHeikinAshi(); IReadOnlyList haSma = haQuotes.ToSma(5); Assert.AreEqual(498, haSma.Count(x => x.Sma != null)); } @@ -33,7 +33,7 @@ public void UseAsQuotes() public override void BadData() { IReadOnlyList r = BadQuotes - .GetHeikinAshi(); + .ToHeikinAshi(); Assert.AreEqual(502, r.Count); } @@ -42,12 +42,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetHeikinAshi(); + .ToHeikinAshi(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetHeikinAshi(); + .ToHeikinAshi(); Assert.AreEqual(1, r1.Count); } diff --git a/tests/indicators/e-k/Hma/Hma.StaticSeries.Tests.cs b/tests/indicators/e-k/Hma/Hma.StaticSeries.Tests.cs index 6e196317c..a0bfafe45 100644 --- a/tests/indicators/e-k/Hma/Hma.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Hma/Hma.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Hma : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetHma(20); + .ToHma(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -26,7 +26,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetHma(20); + .ToHma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(480, results.Count(x => x.Hma != null)); @@ -37,7 +37,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetHma(19); + .ToHma(19); Assert.AreEqual(502, results.Count); Assert.AreEqual(480, results.Count(x => x.Hma != null)); @@ -47,7 +47,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetHma(20) + .ToHma(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -58,7 +58,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetHma(15); + .ToHma(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Hma is double.NaN)); @@ -68,12 +68,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetHma(5); + .ToHma(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetHma(5); + .ToHma(5); Assert.AreEqual(1, r1.Count); } @@ -82,7 +82,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetHma(20) + .ToHma(20) .RemoveWarmupPeriods(); // assertions @@ -96,5 +96,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetHma(1)); + => Quotes.ToHma(1)); } diff --git a/tests/indicators/e-k/HtTrendline/HtTrendline.StaticSeries.Tests.cs b/tests/indicators/e-k/HtTrendline/HtTrendline.StaticSeries.Tests.cs index 0e0572559..d3ce7c5fd 100644 --- a/tests/indicators/e-k/HtTrendline/HtTrendline.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/HtTrendline/HtTrendline.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class HtTrendline : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetHtTrendline(); + .ToHtTrendline(); // proper quantities // should always be the same number of results as there is quotes @@ -61,7 +61,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetHtTrendline(); + .ToHtTrendline(); Assert.AreEqual(502, results.Count); Assert.AreEqual(502, results.Count(x => x.Trendline != null)); @@ -72,7 +72,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetHtTrendline(); + .ToHtTrendline(); Assert.AreEqual(502, results.Count); Assert.AreEqual(501, results.Count(x => x.Trendline != null)); @@ -82,7 +82,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetHtTrendline() + .ToHtTrendline() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -93,7 +93,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetHtTrendline(); + .ToHtTrendline(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Trendline is double.NaN)); @@ -103,7 +103,7 @@ public override void BadData() public void Removed() { IReadOnlyList results = Quotes - .GetHtTrendline() + .ToHtTrendline() .RemoveWarmupPeriods(); // assertions @@ -120,7 +120,7 @@ public void PennyData() IEnumerable penny = Data.GetPenny(); IReadOnlyList r = penny - .GetHtTrendline(); + .ToHtTrendline(); Assert.AreEqual(533, r.Count); } @@ -129,12 +129,12 @@ public void PennyData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetHtTrendline(); + .ToHtTrendline(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetHtTrendline(); + .ToHtTrendline(); Assert.AreEqual(1, r1.Count); } diff --git a/tests/indicators/e-k/Hurst/Hurst.StaticSeries.Tests.cs b/tests/indicators/e-k/Hurst/Hurst.StaticSeries.Tests.cs index e44dc3060..f596df5c5 100644 --- a/tests/indicators/e-k/Hurst/Hurst.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Hurst/Hurst.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Hurst : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = LongestQuotes - .GetHurst(LongestQuotes.Count - 1); + .ToHurst(LongestQuotes.Count - 1); // assertions @@ -25,7 +25,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetHurst(); + .ToHurst(); Assert.AreEqual(502, results.Count); Assert.AreEqual(402, results.Count(x => x.HurstExponent != null)); @@ -35,7 +35,7 @@ public void UseReusable() public void Chainor() { IReadOnlyList results = Quotes - .GetHurst() + .ToHurst() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -47,7 +47,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(10) - .GetHurst(); + .ToHurst(); Assert.AreEqual(502, results.Count); Assert.AreEqual(393, results.Count(x => x.HurstExponent != null)); @@ -57,7 +57,7 @@ public void Chainee() public override void BadData() { IReadOnlyList r = BadQuotes - .GetHurst(150); + .ToHurst(150); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.HurstExponent is double.NaN)); @@ -67,12 +67,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetHurst(); + .ToHurst(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetHurst(); + .ToHurst(); Assert.AreEqual(1, r1.Count); } @@ -80,7 +80,7 @@ public override void NoQuotes() [TestMethod] public void Removed() { - IReadOnlyList results = LongestQuotes.GetHurst(LongestQuotes.Count - 1) + IReadOnlyList results = LongestQuotes.ToHurst(LongestQuotes.Count - 1) .RemoveWarmupPeriods(); // assertions @@ -94,5 +94,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetHurst(19)); + => Quotes.ToHurst(19)); } diff --git a/tests/indicators/e-k/Ichimoku/Ichimoku.StaticSeries.Tests.cs b/tests/indicators/e-k/Ichimoku/Ichimoku.StaticSeries.Tests.cs index 15b047ec1..fd077faa0 100644 --- a/tests/indicators/e-k/Ichimoku/Ichimoku.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Ichimoku/Ichimoku.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int senkouBPeriods = 52; IReadOnlyList results = Quotes - .GetIchimoku(tenkanPeriods, kijunPeriods, senkouBPeriods); + .ToIchimoku(tenkanPeriods, kijunPeriods, senkouBPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -64,7 +64,7 @@ public void Extended() public override void BadData() { IReadOnlyList r = BadQuotes - .GetIchimoku(); + .ToIchimoku(); Assert.AreEqual(502, r.Count); } @@ -73,12 +73,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetIchimoku(); + .ToIchimoku(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetIchimoku(); + .ToIchimoku(); Assert.AreEqual(1, r1.Count); } @@ -87,7 +87,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetIchimoku() + .ToIchimoku() .Condense(); Assert.AreEqual(502, results.Count); @@ -98,15 +98,15 @@ public void Exceptions() { // bad signal period Assert.ThrowsException(() => - Quotes.GetIchimoku(0)); + Quotes.ToIchimoku(0)); // bad short span period Assert.ThrowsException(() => - Quotes.GetIchimoku(9, 0)); + Quotes.ToIchimoku(9, 0)); // bad long span period Assert.ThrowsException(() => - Quotes.GetIchimoku(9, 26, 26)); + Quotes.ToIchimoku(9, 26, 26)); // invalid offsets Assert.ThrowsException(() => diff --git a/tests/indicators/e-k/Kama/Kama.StaticSeries.Tests.cs b/tests/indicators/e-k/Kama/Kama.StaticSeries.Tests.cs index 82f5ba206..bbd19115c 100644 --- a/tests/indicators/e-k/Kama/Kama.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Kama/Kama.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int slowPeriods = 30; IReadOnlyList results = Quotes - .GetKama(erPeriods, fastPeriods, slowPeriods); + .ToKama(erPeriods, fastPeriods, slowPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -53,7 +53,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetKama(); + .ToKama(); Assert.AreEqual(502, results.Count); Assert.AreEqual(493, results.Count(x => x.Kama != null)); @@ -64,7 +64,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetKama(); + .ToKama(); Assert.AreEqual(502, results.Count); Assert.AreEqual(492, results.Count(x => x.Kama != null)); @@ -74,7 +74,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetKama() + .ToKama() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -85,7 +85,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetKama(); + .ToKama(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Kama is double.NaN)); @@ -95,12 +95,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetKama(); + .ToKama(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetKama(); + .ToKama(); Assert.AreEqual(1, r1.Count); } @@ -113,7 +113,7 @@ public void Removed() int slowPeriods = 30; IReadOnlyList results = Quotes - .GetKama(erPeriods, fastPeriods, slowPeriods) + .ToKama(erPeriods, fastPeriods, slowPeriods) .RemoveWarmupPeriods(); // assertions @@ -129,14 +129,14 @@ public void Exceptions() { // bad ER period Assert.ThrowsException(() => - Quotes.GetKama(0)); + Quotes.ToKama(0)); // bad fast period Assert.ThrowsException(() => - Quotes.GetKama(10, 0)); + Quotes.ToKama(10, 0)); // bad slow period Assert.ThrowsException(() => - Quotes.GetKama(10, 5, 5)); + Quotes.ToKama(10, 5, 5)); } } diff --git a/tests/indicators/e-k/Keltner/Keltner.StaticSeries.Tests.cs b/tests/indicators/e-k/Keltner/Keltner.StaticSeries.Tests.cs index 2fd7625ce..ce3dc3c2f 100644 --- a/tests/indicators/e-k/Keltner/Keltner.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Keltner/Keltner.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int atrPeriods = 10; IReadOnlyList results = Quotes - .GetKeltner(emaPeriods, multiplier, atrPeriods); + .ToKeltner(emaPeriods, multiplier, atrPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -40,7 +40,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetKeltner(10, 3, 15); + .ToKeltner(10, 3, 15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.UpperBand is double.NaN)); @@ -50,12 +50,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetKeltner(); + .ToKeltner(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetKeltner(); + .ToKeltner(); Assert.AreEqual(1, r1.Count); } @@ -68,7 +68,7 @@ public void Condense() int atrPeriods = 10; IReadOnlyList results = Quotes - .GetKeltner(emaPeriods, multiplier, atrPeriods) + .ToKeltner(emaPeriods, multiplier, atrPeriods) .Condense(); // assertions @@ -90,7 +90,7 @@ public void Removed() int n = Math.Max(emaPeriods, atrPeriods); IReadOnlyList results = Quotes - .GetKeltner(emaPeriods, multiplier, atrPeriods) + .ToKeltner(emaPeriods, multiplier, atrPeriods) .RemoveWarmupPeriods(); // assertions @@ -108,14 +108,14 @@ public void Exceptions() { // bad EMA period Assert.ThrowsException(() => - Quotes.GetKeltner(1)); + Quotes.ToKeltner(1)); // bad ATR period Assert.ThrowsException(() => - Quotes.GetKeltner(20, 2, 1)); + Quotes.ToKeltner(20, 2, 1)); // bad multiplier Assert.ThrowsException(() => - Quotes.GetKeltner(20, 0)); + Quotes.ToKeltner(20, 0)); } } diff --git a/tests/indicators/e-k/Kvo/Kvo.StaticSeries.Tests.cs b/tests/indicators/e-k/Kvo/Kvo.StaticSeries.Tests.cs index d68cce515..34dccb79f 100644 --- a/tests/indicators/e-k/Kvo/Kvo.StaticSeries.Tests.cs +++ b/tests/indicators/e-k/Kvo/Kvo.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Klinger : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = - Quotes.GetKvo(); + Quotes.ToKvo(); // proper quantities Assert.AreEqual(502, results.Count); @@ -48,7 +48,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetKvo() + .ToKvo() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -59,7 +59,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetKvo(); + .ToKvo(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Oscillator is double.NaN)); @@ -69,12 +69,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetKvo(); + .ToKvo(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetKvo(); + .ToKvo(); Assert.AreEqual(1, r1.Count); } @@ -83,7 +83,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetKvo() + .ToKvo() .RemoveWarmupPeriods(); // assertions @@ -99,14 +99,14 @@ public void Exceptions() { // bad fast period Assert.ThrowsException(() => - Quotes.GetKvo(2)); + Quotes.ToKvo(2)); // bad slow period Assert.ThrowsException(() => - Quotes.GetKvo(20, 20)); + Quotes.ToKvo(20, 20)); // bad signal period Assert.ThrowsException(() => - Quotes.GetKvo(34, 55, 0)); + Quotes.ToKvo(34, 55, 0)); } } diff --git a/tests/indicators/m-r/MaEnvelopes/MaEnvelopes.StaticSeries.Tests.cs b/tests/indicators/m-r/MaEnvelopes/MaEnvelopes.StaticSeries.Tests.cs index 5a24b70f5..13aa3ddd7 100644 --- a/tests/indicators/m-r/MaEnvelopes/MaEnvelopes.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/MaEnvelopes/MaEnvelopes.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class MaEnvelopes : StaticSeriesTestBase public override void Standard() // SMA { IReadOnlyList results = - Quotes.GetMaEnvelopes(20); + Quotes.ToMaEnvelopes(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -34,7 +34,7 @@ public override void Standard() // SMA public void Alma() { IReadOnlyList results = - Quotes.GetMaEnvelopes(10, 2.5, MaType.ALMA); + Quotes.ToMaEnvelopes(10, 2.5, MaType.ALMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -61,7 +61,7 @@ public void Alma() public void Dema() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.DEMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.DEMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -88,7 +88,7 @@ public void Dema() public void Epma() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.EPMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.EPMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -115,7 +115,7 @@ public void Epma() public void Ema() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.EMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.EMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -142,7 +142,7 @@ public void Ema() public void Hma() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.HMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.HMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -164,7 +164,7 @@ public void Hma() public void Smma() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.SMMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.SMMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -191,7 +191,7 @@ public void Smma() public void Tema() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.TEMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.TEMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -218,7 +218,7 @@ public void Tema() public void Wma() { IReadOnlyList results = - Quotes.GetMaEnvelopes(20, 2.5, MaType.WMA); + Quotes.ToMaEnvelopes(20, 2.5, MaType.WMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -241,7 +241,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetMaEnvelopes(10); + .ToMaEnvelopes(10); Assert.AreEqual(502, results.Count); Assert.AreEqual(493, results.Count(x => x.Centerline != null)); @@ -252,7 +252,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetMaEnvelopes(10); + .ToMaEnvelopes(10); Assert.AreEqual(502, results.Count); Assert.AreEqual(492, results.Count(x => x.Centerline != null)); @@ -262,42 +262,42 @@ public void Chainee() public override void BadData() { IReadOnlyList a = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.ALMA); + .ToMaEnvelopes(5, 2.5, MaType.ALMA); Assert.AreEqual(502, a.Count); IReadOnlyList d = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.DEMA); + .ToMaEnvelopes(5, 2.5, MaType.DEMA); Assert.AreEqual(502, d.Count); IReadOnlyList p = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.EPMA); + .ToMaEnvelopes(5, 2.5, MaType.EPMA); Assert.AreEqual(502, p.Count); IReadOnlyList e = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.EMA); + .ToMaEnvelopes(5, 2.5, MaType.EMA); Assert.AreEqual(502, e.Count); IReadOnlyList h = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.HMA); + .ToMaEnvelopes(5, 2.5, MaType.HMA); Assert.AreEqual(502, h.Count); IReadOnlyList s = BadQuotes - .GetMaEnvelopes(5); + .ToMaEnvelopes(5); Assert.AreEqual(502, s.Count); IReadOnlyList t = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.TEMA); + .ToMaEnvelopes(5, 2.5, MaType.TEMA); Assert.AreEqual(502, t.Count); IReadOnlyList w = BadQuotes - .GetMaEnvelopes(5, 2.5, MaType.WMA); + .ToMaEnvelopes(5, 2.5, MaType.WMA); Assert.AreEqual(502, w.Count); } @@ -306,12 +306,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetMaEnvelopes(10); + .ToMaEnvelopes(10); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetMaEnvelopes(10); + .ToMaEnvelopes(10); Assert.AreEqual(1, r1.Count); } @@ -320,7 +320,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetMaEnvelopes(20) + .ToMaEnvelopes(20) .Condense(); Assert.AreEqual(483, results.Count); @@ -331,11 +331,11 @@ public void Exceptions() { // bad offset period Assert.ThrowsException(() => - Quotes.GetMaEnvelopes(14, 0)); + Quotes.ToMaEnvelopes(14, 0)); // bad MA period Assert.ThrowsException(() => - Quotes.GetMaEnvelopes(14, 5, MaType.KAMA)); + Quotes.ToMaEnvelopes(14, 5, MaType.KAMA)); // note: insufficient quotes is tested elsewhere } diff --git a/tests/indicators/m-r/Macd/Macd.StaticSeries.Tests.cs b/tests/indicators/m-r/Macd/Macd.StaticSeries.Tests.cs index dbceb87eb..63f78539e 100644 --- a/tests/indicators/m-r/Macd/Macd.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Macd/Macd.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int signalPeriods = 9; IReadOnlyList results = - Quotes.GetMacd(fastPeriods, slowPeriods, signalPeriods); + Quotes.ToMacd(fastPeriods, slowPeriods, signalPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -47,7 +47,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetMacd(); + .ToMacd(); Assert.AreEqual(502, results.Count); Assert.AreEqual(477, results.Count(x => x.Macd != null)); @@ -58,7 +58,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetMacd(); + .ToMacd(); Assert.AreEqual(502, results.Count); Assert.AreEqual(476, results.Count(x => x.Macd != null)); @@ -68,7 +68,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetMacd() + .ToMacd() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -79,7 +79,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetMacd(10, 20, 5); + .ToMacd(10, 20, 5); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Macd is double.NaN)); @@ -89,12 +89,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetMacd(); + .ToMacd(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetMacd(); + .ToMacd(); Assert.AreEqual(1, r1.Count); } @@ -107,7 +107,7 @@ public void Removed() int signalPeriods = 9; IReadOnlyList results = Quotes - .GetMacd(fastPeriods, slowPeriods, signalPeriods) + .ToMacd(fastPeriods, slowPeriods, signalPeriods) .RemoveWarmupPeriods(); // assertions @@ -124,14 +124,14 @@ public void Exceptions() { // bad fast period Assert.ThrowsException(() => - Quotes.GetMacd(0)); + Quotes.ToMacd(0)); // bad slow periods must be larger than faster period Assert.ThrowsException(() => - Quotes.GetMacd(12, 12)); + Quotes.ToMacd(12, 12)); // bad signal period Assert.ThrowsException(() => - Quotes.GetMacd(12, 26, -1)); + Quotes.ToMacd(12, 26, -1)); } } diff --git a/tests/indicators/m-r/Mama/Mama.StaticSeries.Tests.cs b/tests/indicators/m-r/Mama/Mama.StaticSeries.Tests.cs index 747029e66..bdb748645 100644 --- a/tests/indicators/m-r/Mama/Mama.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Mama/Mama.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() double slowLimit = 0.05; IReadOnlyList results = Quotes - .GetMama(fastLimit, slowLimit); + .ToMama(fastLimit, slowLimit); // proper quantities Assert.AreEqual(502, results.Count); @@ -51,7 +51,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetMama(); + .ToMama(); Assert.AreEqual(502, results.Count); Assert.AreEqual(497, results.Count(x => x.Mama != null)); @@ -62,7 +62,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetMama(); + .ToMama(); Assert.AreEqual(502, results.Count); Assert.AreEqual(496, results.Count(x => x.Mama != null)); @@ -72,7 +72,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetMama() + .ToMama() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -83,7 +83,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetMama(); + .ToMama(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Mama is double.NaN)); @@ -92,11 +92,11 @@ public override void BadData() [TestMethod] public override void NoQuotes() { - IReadOnlyList r0 = Noquotes.GetMama(); + IReadOnlyList r0 = Noquotes.ToMama(); Assert.AreEqual(0, r0.Count); - IReadOnlyList r1 = Onequote.GetMama(); + IReadOnlyList r1 = Onequote.ToMama(); Assert.AreEqual(1, r1.Count); } @@ -108,7 +108,7 @@ public void Removed() double slowLimit = 0.05; IReadOnlyList results = Quotes - .GetMama(fastLimit, slowLimit) + .ToMama(fastLimit, slowLimit) .RemoveWarmupPeriods(); // assertions @@ -124,14 +124,14 @@ public void Exceptions() { // bad fast period (same as slow period) Assert.ThrowsException(() => - Quotes.GetMama(0.5, 0.5)); + Quotes.ToMama(0.5, 0.5)); // bad fast period (cannot be 1 or more) Assert.ThrowsException(() => - Quotes.GetMama(1, 0.5)); + Quotes.ToMama(1, 0.5)); // bad slow period Assert.ThrowsException(() => - Quotes.GetMama(0.5, 0)); + Quotes.ToMama(0.5, 0)); } } diff --git a/tests/indicators/m-r/Marubozu/Marubozu.StaticSeries.Tests.cs b/tests/indicators/m-r/Marubozu/Marubozu.StaticSeries.Tests.cs index 98e858f49..66ba37050 100644 --- a/tests/indicators/m-r/Marubozu/Marubozu.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Marubozu/Marubozu.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Marubozu : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetMarubozu(); + .ToMarubozu(); // proper quantities Assert.AreEqual(502, results.Count); @@ -43,7 +43,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetMarubozu(); + .ToMarubozu(); Assert.AreEqual(502, r.Count); } @@ -52,12 +52,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetMarubozu(); + .ToMarubozu(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetMarubozu(); + .ToMarubozu(); Assert.AreEqual(1, r1.Count); } @@ -66,7 +66,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetMarubozu() + .ToMarubozu() .Condense(); Assert.AreEqual(6, results.Count); @@ -77,9 +77,9 @@ public void Exceptions() { // bad minimum body percent values Assert.ThrowsException(() => - Quotes.GetMarubozu(79.9)); + Quotes.ToMarubozu(79.9)); Assert.ThrowsException(() => - Quotes.GetMarubozu(100.1)); + Quotes.ToMarubozu(100.1)); } } diff --git a/tests/indicators/m-r/Mfi/Mfi.StaticSeries.Tests.cs b/tests/indicators/m-r/Mfi/Mfi.StaticSeries.Tests.cs index f79332ed8..bd5be8d19 100644 --- a/tests/indicators/m-r/Mfi/Mfi.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Mfi/Mfi.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Mfi : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetMfi(); + .ToMfi(); // proper quantities Assert.AreEqual(502, results.Count); @@ -25,7 +25,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetMfi() + .ToMfi() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -38,7 +38,7 @@ public void SmallLookback() int lookbackPeriods = 4; IReadOnlyList results = Quotes - .GetMfi(lookbackPeriods); + .ToMfi(lookbackPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -56,7 +56,7 @@ public void SmallLookback() public override void BadData() { IReadOnlyList r = BadQuotes - .GetMfi(15); + .ToMfi(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Mfi is double.NaN)); @@ -66,12 +66,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetMfi(); + .ToMfi(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetMfi(); + .ToMfi(); Assert.AreEqual(1, r1.Count); } @@ -82,7 +82,7 @@ public void Removed() int lookbackPeriods = 14; IReadOnlyList results = Quotes - .GetMfi(lookbackPeriods) + .ToMfi(lookbackPeriods) .RemoveWarmupPeriods(); // assertions @@ -96,5 +96,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetMfi(1)); + => Quotes.ToMfi(1)); } diff --git a/tests/indicators/m-r/Obv/Obv.StaticSeries.Tests.cs b/tests/indicators/m-r/Obv/Obv.StaticSeries.Tests.cs index ae62e85c4..a0127f678 100644 --- a/tests/indicators/m-r/Obv/Obv.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Obv/Obv.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Obv : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetObv(); + .ToObv(); // proper quantities Assert.AreEqual(502, results.Count); @@ -24,7 +24,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetObv() + .ToObv() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -35,7 +35,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetObv(); + .ToObv(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => double.IsNaN(x.Obv))); @@ -45,7 +45,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetObv(); + .ToObv(); Assert.AreEqual(1246, r.Count); } @@ -54,12 +54,12 @@ public void BigData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetObv(); + .ToObv(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetObv(); + .ToObv(); Assert.AreEqual(1, r1.Count); } diff --git a/tests/indicators/m-r/ParabolicSar/ParabolicSar.StaticSeries.Tests.cs b/tests/indicators/m-r/ParabolicSar/ParabolicSar.StaticSeries.Tests.cs index a5510c360..bdadbe5a1 100644 --- a/tests/indicators/m-r/ParabolicSar/ParabolicSar.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/ParabolicSar/ParabolicSar.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() double maxAccelerationFactor = 0.2; IReadOnlyList results = - Quotes.GetParabolicSar(acclerationStep, maxAccelerationFactor) + Quotes.ToParabolicSar(acclerationStep, maxAccelerationFactor) .ToList(); // proper quantities @@ -77,7 +77,7 @@ public void Extended() public void Chainor() { IReadOnlyList results = Quotes - .GetParabolicSar() + .ToParabolicSar() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -95,7 +95,7 @@ public void InsufficientQuotes() .Take(10); IReadOnlyList results = - insufficientQuotes.GetParabolicSar(acclerationStep, maxAccelerationFactor) + insufficientQuotes.ToParabolicSar(acclerationStep, maxAccelerationFactor) .ToList(); // assertions @@ -119,12 +119,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetParabolicSar(); + .ToParabolicSar(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetParabolicSar(); + .ToParabolicSar(); Assert.AreEqual(1, r1.Count); } @@ -136,7 +136,7 @@ public void Removed() double maxAccelerationFactor = 0.2; IReadOnlyList results = Quotes - .GetParabolicSar(acclerationStep, maxAccelerationFactor) + .ToParabolicSar(acclerationStep, maxAccelerationFactor) .RemoveWarmupPeriods(); // assertions @@ -152,15 +152,15 @@ public void Exceptions() { // bad acceleration step Assert.ThrowsException(() => - Quotes.GetParabolicSar(0, 1)); + Quotes.ToParabolicSar(0, 1)); // insufficient acceleration step Assert.ThrowsException(() => - Quotes.GetParabolicSar(0.02, 0)); + Quotes.ToParabolicSar(0.02, 0)); // step larger than factor Assert.ThrowsException(() => - Quotes.GetParabolicSar(6, 2)); + Quotes.ToParabolicSar(6, 2)); // insufficient initial factor Assert.ThrowsException(() => diff --git a/tests/indicators/m-r/PivotPoints/PivotPoints.StaticSeries.Tests.cs b/tests/indicators/m-r/PivotPoints/PivotPoints.StaticSeries.Tests.cs index 7277120fa..26fd5e7e6 100644 --- a/tests/indicators/m-r/PivotPoints/PivotPoints.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/PivotPoints/PivotPoints.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() PivotPointType pointType = PivotPointType.Standard; IReadOnlyList results = Quotes - .GetPivotPoints(periodSize, pointType); + .ToPivotPoints(periodSize, pointType); // proper quantities Assert.AreEqual(502, results.Count); @@ -91,7 +91,7 @@ public void Camarilla() PivotPointType pointType = PivotPointType.Camarilla; IEnumerable h = Data.GetDefault(38); - IReadOnlyList results = h.GetPivotPoints(periodSize, pointType); + IReadOnlyList results = h.ToPivotPoints(periodSize, pointType); // proper quantities Assert.AreEqual(38, results.Count); @@ -161,7 +161,7 @@ public void Demark() PivotPointType pointType = PivotPointType.Demark; IReadOnlyList results = Quotes - .GetPivotPoints(periodSize, pointType); + .ToPivotPoints(periodSize, pointType); // proper quantities Assert.AreEqual(502, results.Count); @@ -246,7 +246,7 @@ public void Fibonacci() PivotPointType pointType = PivotPointType.Fibonacci; IEnumerable h = Data.GetIntraday(300); - IReadOnlyList results = h.GetPivotPoints(periodSize, pointType); + IReadOnlyList results = h.ToPivotPoints(periodSize, pointType); // proper quantities Assert.AreEqual(300, results.Count); @@ -317,7 +317,7 @@ public void Woodie() PivotPointType pointType = PivotPointType.Woodie; IEnumerable h = Data.GetIntraday(); - IReadOnlyList results = h.GetPivotPoints(periodSize, pointType); + IReadOnlyList results = h.ToPivotPoints(periodSize, pointType); // proper quantities Assert.AreEqual(1564, results.Count); @@ -376,7 +376,7 @@ public void Woodie() public override void BadData() { IReadOnlyList r = BadQuotes - .GetPivotPoints(PeriodSize.Week); + .ToPivotPoints(PeriodSize.Week); Assert.AreEqual(502, r.Count); } @@ -385,12 +385,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetPivotPoints(PeriodSize.Week); + .ToPivotPoints(PeriodSize.Week); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetPivotPoints(PeriodSize.Week); + .ToPivotPoints(PeriodSize.Week); Assert.AreEqual(1, r1.Count); } @@ -402,7 +402,7 @@ public void Removed() PivotPointType pointType = PivotPointType.Standard; IReadOnlyList results = Quotes - .GetPivotPoints(periodSize, pointType) + .ToPivotPoints(periodSize, pointType) .RemoveWarmupPeriods(); // assertions @@ -426,11 +426,11 @@ public void Exceptions() // bad pointtype size Assert.ThrowsException(() => Quotes - .GetPivotPoints(PeriodSize.Week, (PivotPointType)999)); + .ToPivotPoints(PeriodSize.Week, (PivotPointType)999)); // bad window size Assert.ThrowsException(() => Quotes - .GetPivotPoints(PeriodSize.ThreeMinutes)); + .ToPivotPoints(PeriodSize.ThreeMinutes)); } } diff --git a/tests/indicators/m-r/Pivots/Pivots.StaticSeries.Tests.cs b/tests/indicators/m-r/Pivots/Pivots.StaticSeries.Tests.cs index c3cb6298f..ef3c9385f 100644 --- a/tests/indicators/m-r/Pivots/Pivots.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Pivots/Pivots.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Pivots : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetPivots(4, 4); + .ToPivots(4, 4); // proper quantities Assert.AreEqual(502, results.Count); @@ -88,7 +88,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetPivots(); + .ToPivots(); Assert.AreEqual(502, r.Count); } @@ -97,12 +97,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetPivots(); + .ToPivots(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetPivots(); + .ToPivots(); Assert.AreEqual(1, r1.Count); } @@ -111,7 +111,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetPivots(4, 4) + .ToPivots(4, 4) .Condense(); Assert.AreEqual(67, results.Count); @@ -122,14 +122,14 @@ public void Exceptions() { // bad left span Assert.ThrowsException(() => - Quotes.GetPivots(1)); + Quotes.ToPivots(1)); // bad right span Assert.ThrowsException(() => - Quotes.GetPivots(2, 1)); + Quotes.ToPivots(2, 1)); // bad lookback window Assert.ThrowsException(() => - Quotes.GetPivots(20, 10, 20, EndType.Close)); + Quotes.ToPivots(20, 10, 20, EndType.Close)); } } diff --git a/tests/indicators/m-r/Pmo/Pmo.StaticSeries.Tests.cs b/tests/indicators/m-r/Pmo/Pmo.StaticSeries.Tests.cs index 0f1d971ac..97f15b910 100644 --- a/tests/indicators/m-r/Pmo/Pmo.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Pmo/Pmo.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Pmo : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetPmo(); + .ToPmo(); // proper quantities Assert.AreEqual(502, results.Count); @@ -29,7 +29,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetPmo(); + .ToPmo(); Assert.AreEqual(502, results.Count); Assert.AreEqual(448, results.Count(x => x.Pmo != null)); @@ -40,7 +40,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetPmo(); + .ToPmo(); Assert.AreEqual(502, results.Count); Assert.AreEqual(447, results.Count(x => x.Pmo != null)); @@ -50,7 +50,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetPmo() + .ToPmo() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -61,7 +61,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetPmo(25, 15, 5); + .ToPmo(25, 15, 5); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Pmo is double.NaN)); @@ -71,12 +71,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetPmo(); + .ToPmo(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetPmo(); + .ToPmo(); Assert.AreEqual(1, r1.Count); } @@ -85,7 +85,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetPmo() + .ToPmo() .RemoveWarmupPeriods(); // assertions @@ -101,14 +101,14 @@ public void Exceptions() { // bad time period Assert.ThrowsException(() => - Quotes.GetPmo(1)); + Quotes.ToPmo(1)); // bad smoothing period Assert.ThrowsException(() => - Quotes.GetPmo(5, 0)); + Quotes.ToPmo(5, 0)); // bad signal period Assert.ThrowsException(() => - Quotes.GetPmo(5, 5, 0)); + Quotes.ToPmo(5, 5, 0)); } } diff --git a/tests/indicators/m-r/Prs/Prs.StaticSeries.Tests.cs b/tests/indicators/m-r/Prs/Prs.StaticSeries.Tests.cs index 14a6b43ad..debcc99da 100644 --- a/tests/indicators/m-r/Prs/Prs.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Prs/Prs.StaticSeries.Tests.cs @@ -9,7 +9,7 @@ public override void Standard() int lookbackPeriods = 30; IReadOnlyList results = OtherQuotes - .GetPrs(Quotes, lookbackPeriods); + .ToPrs(Quotes, lookbackPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -34,7 +34,7 @@ public void UseReusable() { IReadOnlyList results = OtherQuotes .Use(CandlePart.Close) - .GetPrs(Quotes.Use(CandlePart.Close), 20); + .ToPrs(Quotes.Use(CandlePart.Close), 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(502, results.Count(x => x.Prs != null)); @@ -44,7 +44,7 @@ public void UseReusable() public void Chainor() { IReadOnlyList results = OtherQuotes - .GetPrs(Quotes, 20) + .ToPrs(Quotes, 20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -56,7 +56,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetPrs(OtherQuotes.ToSma(2), 20); + .ToPrs(OtherQuotes.ToSma(2), 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(501, results.Count(x => x.Prs != null)); @@ -67,7 +67,7 @@ public void Chainee() public override void BadData() { IReadOnlyList r = BadQuotes - .GetPrs(BadQuotes, 15); + .ToPrs(BadQuotes, 15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Prs is double.NaN)); @@ -77,12 +77,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetPrs(Noquotes); + .ToPrs(Noquotes); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetPrs(Onequote); + .ToPrs(Onequote); Assert.AreEqual(1, r1.Count); } @@ -92,18 +92,18 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - OtherQuotes.GetPrs(Quotes, 0)); + OtherQuotes.ToPrs(Quotes, 0)); // insufficient quotes Assert.ThrowsException(() => - Data.GetCompare(13).GetPrs(Quotes, 14)); + Data.GetCompare(13).ToPrs(Quotes, 14)); // insufficient eval quotes Assert.ThrowsException(() => - Data.GetCompare(300).GetPrs(Quotes, 14)); + Data.GetCompare(300).ToPrs(Quotes, 14)); // mismatch quotes Assert.ThrowsException(() => - OtherQuotes.GetPrs(MismatchQuotes, 14)); + OtherQuotes.ToPrs(MismatchQuotes, 14)); } } diff --git a/tests/indicators/m-r/Pvo/Pvo.StaticSeries.Tests.cs b/tests/indicators/m-r/Pvo/Pvo.StaticSeries.Tests.cs index 866c40d04..6b5e8123d 100644 --- a/tests/indicators/m-r/Pvo/Pvo.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Pvo/Pvo.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int signalPeriods = 9; IReadOnlyList results = - Quotes.GetPvo(fastPeriods, slowPeriods, signalPeriods); + Quotes.ToPvo(fastPeriods, slowPeriods, signalPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -50,7 +50,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetPvo() + .ToPvo() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -61,7 +61,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetPvo(10, 20, 5); + .ToPvo(10, 20, 5); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Pvo is double.NaN)); @@ -71,12 +71,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetPvo(); + .ToPvo(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetPvo(); + .ToPvo(); Assert.AreEqual(1, r1.Count); } @@ -89,7 +89,7 @@ public void Removed() int signalPeriods = 9; IReadOnlyList results = Quotes - .GetPvo(fastPeriods, slowPeriods, signalPeriods) + .ToPvo(fastPeriods, slowPeriods, signalPeriods) .RemoveWarmupPeriods(); // assertions @@ -106,14 +106,14 @@ public void Exceptions() { // bad fast period Assert.ThrowsException(() => - Quotes.GetPvo(0)); + Quotes.ToPvo(0)); // bad slow periods must be larger than faster period Assert.ThrowsException(() => - Quotes.GetPvo(12, 12)); + Quotes.ToPvo(12, 12)); // bad signal period Assert.ThrowsException(() => - Quotes.GetPvo(12, 26, -1)); + Quotes.ToPvo(12, 26, -1)); } } diff --git a/tests/indicators/m-r/Renko/Renko.StaticSeries.Tests.cs b/tests/indicators/m-r/Renko/Renko.StaticSeries.Tests.cs index df8046942..1a2ed70ac 100644 --- a/tests/indicators/m-r/Renko/Renko.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Renko/Renko.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Renko : StaticSeriesTestBase public override void Standard() // close { IReadOnlyList results = Quotes - .GetRenko(2.5m); + .ToRenko(2.5m); // assertions @@ -45,7 +45,7 @@ public override void Standard() // close public void StandardHighLow() { IReadOnlyList results = Quotes - .GetRenko(2.5m, EndType.HighLow); + .ToRenko(2.5m, EndType.HighLow); // assertions @@ -107,7 +107,7 @@ public void Atr() [TestMethod] public void UseAsQuotes() { - IReadOnlyList renkoQuotes = Quotes.GetRenko(2.5m); + IReadOnlyList renkoQuotes = Quotes.ToRenko(2.5m); IReadOnlyList renkoSma = renkoQuotes.ToSma(5); Assert.AreEqual(108, renkoSma.Count(x => x.Sma != null)); } @@ -116,7 +116,7 @@ public void UseAsQuotes() public override void BadData() { IReadOnlyList r = BadQuotes - .GetRenko(100m); + .ToRenko(100m); Assert.AreNotEqual(0, r.Count); } @@ -125,7 +125,7 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetRenko(0.01m); + .ToRenko(0.01m); Assert.AreEqual(0, r0.Count); } @@ -135,10 +135,10 @@ public void Exceptions() { // bad arguments Assert.ThrowsException(() - => Quotes.GetRenko(0)); + => Quotes.ToRenko(0)); // bad end type Assert.ThrowsException(() - => Quotes.GetRenko(2, (EndType)int.MaxValue)); + => Quotes.ToRenko(2, (EndType)int.MaxValue)); } } diff --git a/tests/indicators/m-r/Renko/Renko.StreamHub.Tests.cs b/tests/indicators/m-r/Renko/Renko.StreamHub.Tests.cs index 8899267f2..c995d2dc7 100644 --- a/tests/indicators/m-r/Renko/Renko.StreamHub.Tests.cs +++ b/tests/indicators/m-r/Renko/Renko.StreamHub.Tests.cs @@ -59,7 +59,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetRenko(brickSize, endType); + .ToRenko(brickSize, endType); // assert, should equal series streamList.Should().BeEquivalentTo(seriesList); @@ -105,7 +105,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetRenko(brickSize, endType) + .ToRenko(brickSize, endType) .ToSma(smaPeriods); // assert, should equal series diff --git a/tests/indicators/m-r/Roc/Roc.StaticSeries.Tests.cs b/tests/indicators/m-r/Roc/Roc.StaticSeries.Tests.cs index a246ab33d..1042bca94 100644 --- a/tests/indicators/m-r/Roc/Roc.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Roc/Roc.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Roc : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetRoc(20); + .ToRoc(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -33,7 +33,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetRoc(20); + .ToRoc(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Roc != null)); @@ -44,7 +44,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetRoc(20); + .ToRoc(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Roc != null)); @@ -54,7 +54,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetRoc(20) + .ToRoc(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -65,7 +65,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetRoc(35); + .ToRoc(35); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Roc is double.NaN)); @@ -75,12 +75,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetRoc(5); + .ToRoc(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetRoc(5); + .ToRoc(5); Assert.AreEqual(1, r1.Count); } @@ -89,7 +89,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetRoc(20) + .ToRoc(20) .RemoveWarmupPeriods(); // assertions @@ -103,5 +103,5 @@ public void Removed() public void Exceptions() => // bad lookback period Assert.ThrowsException(() => - Quotes.GetRoc(0)); + Quotes.ToRoc(0)); } diff --git a/tests/indicators/m-r/RocWb/RocWb.StaticSeries.Tests.cs b/tests/indicators/m-r/RocWb/RocWb.StaticSeries.Tests.cs index 584af10ae..65bd3dd2e 100644 --- a/tests/indicators/m-r/RocWb/RocWb.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/RocWb/RocWb.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class RocWb : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetRocWb(20, 3, 20); + .ToRocWb(20, 3, 20); // proper quantities Assert.AreEqual(502, results.Count); @@ -71,7 +71,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetRocWb(20, 3, 20); + .ToRocWb(20, 3, 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Roc != null)); @@ -82,7 +82,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetRocWb(20, 3, 20); + .ToRocWb(20, 3, 20); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Roc != null)); @@ -92,7 +92,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetRocWb(20, 3, 20) + .ToRocWb(20, 3, 20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -103,7 +103,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetRocWb(35, 3, 35); + .ToRocWb(35, 3, 35); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Roc is double.NaN)); @@ -113,12 +113,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetRocWb(5, 3, 2); + .ToRocWb(5, 3, 2); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetRocWb(5, 3, 2); + .ToRocWb(5, 3, 2); Assert.AreEqual(1, r1.Count); } @@ -127,7 +127,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetRocWb(20, 3, 20) + .ToRocWb(20, 3, 20) .RemoveWarmupPeriods(); // assertions @@ -145,14 +145,14 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetRocWb(0, 3, 12)); + Quotes.ToRocWb(0, 3, 12)); // bad EMA period Assert.ThrowsException(() => - Quotes.GetRocWb(14, 0, 14)); + Quotes.ToRocWb(14, 0, 14)); // bad STDDEV period Assert.ThrowsException(() => - Quotes.GetRocWb(15, 3, 16)); + Quotes.ToRocWb(15, 3, 16)); } } diff --git a/tests/indicators/m-r/RollingPivots/RollingPivots.StaticSeries.Tests.cs b/tests/indicators/m-r/RollingPivots/RollingPivots.StaticSeries.Tests.cs index b5735dda2..456ea905d 100644 --- a/tests/indicators/m-r/RollingPivots/RollingPivots.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/RollingPivots/RollingPivots.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() PivotPointType pointType = PivotPointType.Standard; IReadOnlyList results = - Quotes.GetRollingPivots(windowPeriods, offsetPeriods, pointType); + Quotes.ToRollingPivots(windowPeriods, offsetPeriods, pointType); // proper quantities Assert.AreEqual(502, results.Count); @@ -84,7 +84,7 @@ public void Camarilla() IEnumerable h = Data.GetDefault(38); IReadOnlyList results = h - .GetRollingPivots(windowPeriods, offsetPeriods, pointType); + .ToRollingPivots(windowPeriods, offsetPeriods, pointType); // proper quantities Assert.AreEqual(38, results.Count); @@ -155,7 +155,7 @@ public void Demark() PivotPointType pointType = PivotPointType.Demark; IReadOnlyList results = Quotes - .GetRollingPivots(windowPeriods, offsetPeriods, pointType); + .ToRollingPivots(windowPeriods, offsetPeriods, pointType); // proper quantities Assert.AreEqual(502, results.Count); @@ -239,7 +239,7 @@ public void Fibonacci() IEnumerable h = Data.GetIntraday(300); IReadOnlyList results = - h.GetRollingPivots(windowPeriods, offsetPeriods, pointType); + h.ToRollingPivots(windowPeriods, offsetPeriods, pointType); // proper quantities Assert.AreEqual(300, results.Count); @@ -313,7 +313,7 @@ public void Woodie() IEnumerable h = Data.GetIntraday(); IReadOnlyList results = h - .GetRollingPivots(windowPeriods, offsetPeriods, pointType); + .ToRollingPivots(windowPeriods, offsetPeriods, pointType); // proper quantities Assert.AreEqual(1564, results.Count); @@ -372,7 +372,7 @@ public void Woodie() public override void BadData() { IReadOnlyList r = BadQuotes - .GetRollingPivots(5, 5); + .ToRollingPivots(5, 5); Assert.AreEqual(502, r.Count); } @@ -381,12 +381,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetRollingPivots(5, 2); + .ToRollingPivots(5, 2); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetRollingPivots(5, 2); + .ToRollingPivots(5, 2); Assert.AreEqual(1, r1.Count); } @@ -399,7 +399,7 @@ public void Removed() PivotPointType pointType = PivotPointType.Standard; IReadOnlyList results = Quotes - .GetRollingPivots(windowPeriods, offsetPeriods, pointType) + .ToRollingPivots(windowPeriods, offsetPeriods, pointType) .RemoveWarmupPeriods(); // assertions @@ -422,10 +422,10 @@ public void Exceptions() { // bad window period Assert.ThrowsException(() => - Quotes.GetRollingPivots(0, 10)); + Quotes.ToRollingPivots(0, 10)); // bad offset period Assert.ThrowsException(() => - Quotes.GetRollingPivots(10, -1)); + Quotes.ToRollingPivots(10, -1)); } } diff --git a/tests/indicators/m-r/Rsi/Rsi.StaticSeries.Tests.cs b/tests/indicators/m-r/Rsi/Rsi.StaticSeries.Tests.cs index de79ccff7..e5c60430b 100644 --- a/tests/indicators/m-r/Rsi/Rsi.StaticSeries.Tests.cs +++ b/tests/indicators/m-r/Rsi/Rsi.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Rsi : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetRsi(); + .ToRsi(); // proper quantities Assert.AreEqual(502, results.Count); @@ -32,7 +32,7 @@ public void SmallLookback() { int lookbackPeriods = 1; IReadOnlyList results = Quotes - .GetRsi(lookbackPeriods); + .ToRsi(lookbackPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -52,7 +52,7 @@ public void CryptoData() IReadOnlyList btc = Data.GetBitcoin(); IReadOnlyList r = btc - .GetRsi(1); + .ToRsi(1); Assert.AreEqual(1246, r.Count); } @@ -62,7 +62,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetRsi(); + .ToRsi(); Assert.AreEqual(502, results.Count); Assert.AreEqual(488, results.Count(x => x.Rsi != null)); @@ -73,7 +73,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetRsi(); + .ToRsi(); Assert.AreEqual(502, results.Count); Assert.AreEqual(487, results.Count(x => x.Rsi != null)); @@ -83,7 +83,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetRsi() + .ToRsi() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -94,7 +94,7 @@ public void Chainor() public void NaN() { IEnumerable r = Data.GetBtcUsdNan() - .GetRsi(); + .ToRsi(); Assert.AreEqual(0, r.Count(x => x.Rsi is double.NaN)); } @@ -103,7 +103,7 @@ public void NaN() public override void BadData() { IReadOnlyList r = BadQuotes - .GetRsi(20); + .ToRsi(20); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Rsi is double.NaN)); @@ -113,12 +113,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetRsi(); + .ToRsi(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetRsi(); + .ToRsi(); Assert.AreEqual(1, r1.Count); } @@ -127,7 +127,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetRsi() + .ToRsi() .RemoveWarmupPeriods(); // assertions @@ -141,5 +141,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetRsi(0)); + => Quotes.ToRsi(0)); } diff --git a/tests/indicators/s-z/Slope/Slope.StaticSeries.Tests.cs b/tests/indicators/s-z/Slope/Slope.StaticSeries.Tests.cs index 168aed275..9fc6af0f4 100644 --- a/tests/indicators/s-z/Slope/Slope.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Slope/Slope.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Slope : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetSlope(20); + .ToSlope(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -43,7 +43,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetSlope(20); + .ToSlope(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Slope != null)); @@ -54,7 +54,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetSlope(20); + .ToSlope(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Slope != null)); @@ -64,7 +64,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetSlope(20) + .ToSlope(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -75,7 +75,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetSlope(15); + .ToSlope(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Slope is double.NaN)); @@ -85,7 +85,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetSlope(250); + .ToSlope(250); Assert.AreEqual(1246, r.Count); } @@ -94,12 +94,12 @@ public void BigData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetSlope(5); + .ToSlope(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetSlope(5); + .ToSlope(5); Assert.AreEqual(1, r1.Count); } @@ -108,7 +108,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetSlope(20) + .ToSlope(20) .RemoveWarmupPeriods(); // assertions @@ -126,5 +126,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetSlope(1)); + => Quotes.ToSlope(1)); } diff --git a/tests/indicators/s-z/SmaAnalysis/SmaAnalysis.StaticSeries.Tests.cs b/tests/indicators/s-z/SmaAnalysis/SmaAnalysis.StaticSeries.Tests.cs index 31452ea82..1b41ece3d 100644 --- a/tests/indicators/s-z/SmaAnalysis/SmaAnalysis.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/SmaAnalysis/SmaAnalysis.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class SmaAnalyses : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetSmaAnalysis(20); + .ToSmaAnalysis(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -26,7 +26,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetSmaAnalysis(20); + .ToSmaAnalysis(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Sma != null)); @@ -37,7 +37,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetSmaAnalysis(20); + .ToSmaAnalysis(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Sma != null)); @@ -47,7 +47,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetSmaAnalysis(10) + .ToSmaAnalysis(10) .ToEma(10); Assert.AreEqual(502, results.Count); @@ -58,7 +58,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetSmaAnalysis(15); + .ToSmaAnalysis(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Mape is double.NaN)); @@ -68,12 +68,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetSmaAnalysis(6); + .ToSmaAnalysis(6); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetSmaAnalysis(6); + .ToSmaAnalysis(6); Assert.AreEqual(1, r1.Count); } @@ -82,7 +82,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetSmaAnalysis(20) + .ToSmaAnalysis(20) .RemoveWarmupPeriods(); // assertions @@ -94,5 +94,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetSmaAnalysis(0)); + => Quotes.ToSmaAnalysis(0)); } diff --git a/tests/indicators/s-z/Smi/Smi.StaticSeries.Tests.cs b/tests/indicators/s-z/Smi/Smi.StaticSeries.Tests.cs index 46ea3bc3e..5dc184c73 100644 --- a/tests/indicators/s-z/Smi/Smi.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Smi/Smi.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Smi : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetSmi(14, 20, 5); + .ToSmi(14, 20, 5); // proper quantities Assert.AreEqual(502, results.Count); @@ -48,7 +48,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetSmi(14, 20, 5) + .ToSmi(14, 20, 5) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -59,7 +59,7 @@ public void Chainor() public void NoSignal() { IReadOnlyList results = Quotes - .GetSmi(5, 20, 20, 1); + .ToSmi(5, 20, 20, 1); // signal equals oscillator SmiResult r1 = results[487]; @@ -73,7 +73,7 @@ public void NoSignal() public void SmallPeriods() { IReadOnlyList results = Quotes - .GetSmi(1, 1, 1, 5); + .ToSmi(1, 1, 1, 5); // sample values SmiResult r51 = results[51]; @@ -93,7 +93,7 @@ public void SmallPeriods() public override void BadData() { IReadOnlyList r = BadQuotes - .GetSmi(5, 5, 1, 5); + .ToSmi(5, 5, 1, 5); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Smi is double.NaN)); @@ -103,12 +103,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetSmi(5, 5); + .ToSmi(5, 5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetSmi(5, 3, 3); + .ToSmi(5, 3, 3); Assert.AreEqual(1, r1.Count); } @@ -117,7 +117,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetSmi(14, 20, 5) + .ToSmi(14, 20, 5) .RemoveWarmupPeriods(); // assertions @@ -133,18 +133,18 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetSmi(0, 5, 5, 5)); + Quotes.ToSmi(0, 5, 5, 5)); // bad first smooth period Assert.ThrowsException(() => - Quotes.GetSmi(14, 0, 5, 5)); + Quotes.ToSmi(14, 0, 5, 5)); // bad second smooth period Assert.ThrowsException(() => - Quotes.GetSmi(14, 3, 0, 5)); + Quotes.ToSmi(14, 3, 0, 5)); // bad signal Assert.ThrowsException(() => - Quotes.GetSmi(9, 3, 1, 0)); + Quotes.ToSmi(9, 3, 1, 0)); } } diff --git a/tests/indicators/s-z/Smma/Smma.StaticSeries.Tests.cs b/tests/indicators/s-z/Smma/Smma.StaticSeries.Tests.cs index aad46502e..b2370be85 100644 --- a/tests/indicators/s-z/Smma/Smma.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Smma/Smma.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Smma : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetSmma(20); + .ToSmma(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -30,7 +30,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetSmma(20); + .ToSmma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Smma != null)); @@ -41,7 +41,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetSmma(20); + .ToSmma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Smma != null)); @@ -51,7 +51,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetSmma(20) + .ToSmma(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -62,7 +62,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetSmma(15); + .ToSmma(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Smma is double.NaN)); @@ -72,12 +72,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetSmma(5); + .ToSmma(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetSmma(5); + .ToSmma(5); Assert.AreEqual(1, r1.Count); } @@ -86,7 +86,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetSmma(20) + .ToSmma(20) .RemoveWarmupPeriods(); // assertions @@ -98,5 +98,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetSmma(0)); + => Quotes.ToSmma(0)); } diff --git a/tests/indicators/s-z/StarcBands/StarcBands.StaticSeries.Tests.cs b/tests/indicators/s-z/StarcBands/StarcBands.StaticSeries.Tests.cs index 7467d3585..86030fed3 100644 --- a/tests/indicators/s-z/StarcBands/StarcBands.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/StarcBands/StarcBands.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int atrPeriods = 14; IReadOnlyList results = Quotes - .GetStarcBands(smaPeriods, multiplier, atrPeriods); + .ToStarcBands(smaPeriods, multiplier, atrPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -50,7 +50,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetStarcBands(10, 3, 15); + .ToStarcBands(10, 3, 15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.UpperBand is double.NaN)); @@ -60,12 +60,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetStarcBands(10); + .ToStarcBands(10); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetStarcBands(10); + .ToStarcBands(10); Assert.AreEqual(1, r1.Count); } @@ -79,7 +79,7 @@ public void Condense() int lookbackPeriods = Math.Max(smaPeriods, atrPeriods); IReadOnlyList results = Quotes - .GetStarcBands(smaPeriods, multiplier, atrPeriods) + .ToStarcBands(smaPeriods, multiplier, atrPeriods) .Condense(); // assertions @@ -100,7 +100,7 @@ public void Removed() int lookbackPeriods = Math.Max(smaPeriods, atrPeriods); IReadOnlyList results = Quotes - .GetStarcBands(smaPeriods, multiplier, atrPeriods) + .ToStarcBands(smaPeriods, multiplier, atrPeriods) .RemoveWarmupPeriods(); // assertions @@ -117,14 +117,14 @@ public void Exceptions() { // bad EMA period Assert.ThrowsException(() => - Quotes.GetStarcBands(1)); + Quotes.ToStarcBands(1)); // bad ATR period Assert.ThrowsException(() => - Quotes.GetStarcBands(20, 2, 1)); + Quotes.ToStarcBands(20, 2, 1)); // bad multiplier Assert.ThrowsException(() => - Quotes.GetStarcBands(20, 0)); + Quotes.ToStarcBands(20, 0)); } } diff --git a/tests/indicators/s-z/Stc/Stc.StaticSeries.Tests.cs b/tests/indicators/s-z/Stc/Stc.StaticSeries.Tests.cs index 37480617f..9cf0fbb6b 100644 --- a/tests/indicators/s-z/Stc/Stc.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Stc/Stc.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() int slowPeriods = 26; IReadOnlyList results = Quotes - .GetStc(cyclePeriods, fastPeriods, slowPeriods); + .ToStc(cyclePeriods, fastPeriods, slowPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -39,7 +39,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetStc(9, 12, 26); + .ToStc(9, 12, 26); Assert.AreEqual(502, results.Count); Assert.AreEqual(467, results.Count(x => x.Stc != null)); @@ -50,7 +50,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetStc(9, 12, 26); + .ToStc(9, 12, 26); Assert.AreEqual(502, results.Count); Assert.AreEqual(466, results.Count(x => x.Stc != null)); @@ -60,7 +60,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetStc(9, 12, 26) + .ToStc(9, 12, 26) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -71,7 +71,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetStc(); + .ToStc(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Stc is double.NaN)); @@ -81,12 +81,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetStc(); + .ToStc(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetStc(); + .ToStc(); Assert.AreEqual(1, r1.Count); } @@ -99,7 +99,7 @@ public void Issue1107() RandomGbm quotes = new(58); IReadOnlyList results = quotes - .GetStc(); + .ToStc(); Assert.AreEqual(58, results.Count); } @@ -112,7 +112,7 @@ public void Removed() int slowPeriods = 26; IReadOnlyList results = Quotes - .GetStc(cyclePeriods, fastPeriods, slowPeriods) + .ToStc(cyclePeriods, fastPeriods, slowPeriods) .RemoveWarmupPeriods(); // assertions @@ -127,14 +127,14 @@ public void Exceptions() { // bad fast period Assert.ThrowsException(() => - Quotes.GetStc(9, 0, 26)); + Quotes.ToStc(9, 0, 26)); // bad slow periods must be larger than faster period Assert.ThrowsException(() => - Quotes.GetStc(9, 12, 12)); + Quotes.ToStc(9, 12, 12)); // bad signal period Assert.ThrowsException(() => - Quotes.GetStc(-1, 12, 26)); + Quotes.ToStc(-1, 12, 26)); } } diff --git a/tests/indicators/s-z/StdDev/StdDev.StaticSeries.Tests.cs b/tests/indicators/s-z/StdDev/StdDev.StaticSeries.Tests.cs index ab4eb254e..c4fbc30b0 100644 --- a/tests/indicators/s-z/StdDev/StdDev.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/StdDev/StdDev.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class StdDev : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetStdDev(10); + .ToStdDev(10); // proper quantities Assert.AreEqual(502, results.Count); @@ -41,7 +41,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetStdDev(10); + .ToStdDev(10); Assert.AreEqual(502, results.Count); Assert.AreEqual(493, results.Count(x => x.StdDev != null)); @@ -52,7 +52,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetStdDev(10); + .ToStdDev(10); Assert.AreEqual(502, results.Count); Assert.AreEqual(492, results.Count(x => x.StdDev != null)); @@ -62,7 +62,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetStdDev(10) + .ToStdDev(10) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -73,7 +73,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetStdDev(15); + .ToStdDev(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.StdDev is double.NaN)); @@ -83,7 +83,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetStdDev(200); + .ToStdDev(200); Assert.AreEqual(1246, r.Count); } @@ -92,12 +92,12 @@ public void BigData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetStdDev(10); + .ToStdDev(10); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetStdDev(10); + .ToStdDev(10); Assert.AreEqual(1, r1.Count); } @@ -106,7 +106,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetStdDev(10) + .ToStdDev(10) .RemoveWarmupPeriods(); // assertions @@ -123,5 +123,5 @@ public void Exceptions() => // bad lookback period Assert.ThrowsException(() => - Quotes.GetStdDev(1)); + Quotes.ToStdDev(1)); } diff --git a/tests/indicators/s-z/StdDevChannels/StdDevChannels.StaticSeries.Tests.cs b/tests/indicators/s-z/StdDevChannels/StdDevChannels.StaticSeries.Tests.cs index 14b5e5af3..dc145f82b 100644 --- a/tests/indicators/s-z/StdDevChannels/StdDevChannels.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/StdDevChannels/StdDevChannels.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() double standardDeviations = 2; IReadOnlyList results = - Quotes.GetStdDevChannels(lookbackPeriods, standardDeviations); + Quotes.ToStdDevChannels(lookbackPeriods, standardDeviations); // proper quantities Assert.AreEqual(502, results.Count); @@ -68,7 +68,7 @@ public void FullHistory() // null provided for lookback period IReadOnlyList results = - Quotes.GetStdDevChannels(null); + Quotes.ToStdDevChannels(null); // proper quantities Assert.AreEqual(502, results.Count); @@ -100,7 +100,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetStdDevChannels(); + .ToStdDevChannels(); Assert.AreEqual(502, results.Count); Assert.AreEqual(500, results.Count(x => x.Centerline != null)); @@ -111,7 +111,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetStdDevChannels(); + .ToStdDevChannels(); Assert.AreEqual(502, results.Count); Assert.AreEqual(500, results.Count(x => x.Centerline != null)); @@ -121,7 +121,7 @@ public void Chainee() public override void BadData() { IReadOnlyList r = BadQuotes - .GetStdDevChannels(); + .ToStdDevChannels(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.UpperChannel is double.NaN)); @@ -131,12 +131,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetStdDevChannels(); + .ToStdDevChannels(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetStdDevChannels(); + .ToStdDevChannels(); Assert.AreEqual(1, r1.Count); } @@ -148,7 +148,7 @@ public void Condense() double standardDeviations = 2; IReadOnlyList results = Quotes - .GetStdDevChannels(lookbackPeriods, standardDeviations) + .ToStdDevChannels(lookbackPeriods, standardDeviations) .Condense(); // assertions @@ -167,7 +167,7 @@ public void Removed() double standardDeviations = 2; IReadOnlyList results = Quotes - .GetStdDevChannels(lookbackPeriods, standardDeviations) + .ToStdDevChannels(lookbackPeriods, standardDeviations) .RemoveWarmupPeriods(); // assertions @@ -184,10 +184,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetStdDevChannels(0)); + Quotes.ToStdDevChannels(0)); // bad standard deviations Assert.ThrowsException(() => - Quotes.GetStdDevChannels(20, 0)); + Quotes.ToStdDevChannels(20, 0)); } } diff --git a/tests/indicators/s-z/Stoch/Stoch.StaticSeries.Tests.cs b/tests/indicators/s-z/Stoch/Stoch.StaticSeries.Tests.cs index bb5f2cf90..6e8fe7a1b 100644 --- a/tests/indicators/s-z/Stoch/Stoch.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Stoch/Stoch.StaticSeries.Tests.cs @@ -11,7 +11,7 @@ public override void Standard() // Slow int smoothPeriods = 3; IReadOnlyList results = Quotes - .GetStoch(lookbackPeriods, signalPeriods, smoothPeriods); + .ToStoch(lookbackPeriods, signalPeriods, smoothPeriods); // proper quantities Assert.AreEqual(502, results.Count); @@ -72,7 +72,7 @@ public override void Standard() // Slow public void Extended() // with extra parameters { IReadOnlyList results = - Quotes.GetStoch(9, 3, 3, 5, 4, MaType.SMMA); + Quotes.ToStoch(9, 3, 3, 5, 4, MaType.SMMA); // proper quantities Assert.AreEqual(502, results.Count); @@ -115,7 +115,7 @@ public void Extended() // with extra parameters public void Chainor() { IReadOnlyList results = Quotes - .GetStoch() + .ToStoch() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -130,7 +130,7 @@ public void NoSignal() const int smoothPeriods = 3; IReadOnlyList results = Quotes - .GetStoch(lookbackPeriods, signalPeriods, smoothPeriods); + .ToStoch(lookbackPeriods, signalPeriods, smoothPeriods); // signal equals oscillator StochResult r1 = results[487]; @@ -148,7 +148,7 @@ public void Fast() int smoothPeriods = 1; IReadOnlyList results = Quotes - .GetStoch(lookbackPeriods, signalPeriods, smoothPeriods); + .ToStoch(lookbackPeriods, signalPeriods, smoothPeriods); // sample values StochResult r1 = results[487]; @@ -168,7 +168,7 @@ public void FastSmall() int smoothPeriods = 1; IReadOnlyList results = Quotes - .GetStoch(lookbackPeriods, signalPeriods, smoothPeriods); + .ToStoch(lookbackPeriods, signalPeriods, smoothPeriods); // sample values StochResult r1 = results[70]; @@ -182,7 +182,7 @@ public void FastSmall() public override void BadData() { IReadOnlyList r = BadQuotes - .GetStoch(15); + .ToStoch(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Oscillator is double.NaN)); @@ -192,12 +192,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetStoch(); + .ToStoch(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetStoch(); + .ToStoch(); Assert.AreEqual(1, r1.Count); } @@ -210,7 +210,7 @@ public void Removed() int smoothPeriods = 3; IReadOnlyList results = Quotes - .GetStoch(lookbackPeriods, signalPeriods, smoothPeriods) + .ToStoch(lookbackPeriods, signalPeriods, smoothPeriods) .RemoveWarmupPeriods(); // assertions @@ -231,7 +231,7 @@ public void Boundary() IReadOnlyList results = Data .GetRandom(2500) - .GetStoch(lookbackPeriods, signalPeriods, smoothPeriods); + .ToStoch(lookbackPeriods, signalPeriods, smoothPeriods); // test boundary condition @@ -264,26 +264,26 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetStoch(0)); + Quotes.ToStoch(0)); // bad signal period Assert.ThrowsException(() => - Quotes.GetStoch(14, 0)); + Quotes.ToStoch(14, 0)); // bad smoothing period Assert.ThrowsException(() => - Quotes.GetStoch(14, 3, 0)); + Quotes.ToStoch(14, 3, 0)); // bad kFactor Assert.ThrowsException(() => - Quotes.GetStoch(9, 3, 1, 0, 2, MaType.SMA)); + Quotes.ToStoch(9, 3, 1, 0, 2, MaType.SMA)); // bad dFactor Assert.ThrowsException(() => - Quotes.GetStoch(9, 3, 1, 3, 0, MaType.SMA)); + Quotes.ToStoch(9, 3, 1, 3, 0, MaType.SMA)); // bad MA type Assert.ThrowsException(() => - Quotes.GetStoch(9, 3, 3, 3, 2, MaType.ALMA)); + Quotes.ToStoch(9, 3, 3, 3, 2, MaType.ALMA)); } } diff --git a/tests/indicators/s-z/StochRsi/StochRsi.StaticSeries.Tests.cs b/tests/indicators/s-z/StochRsi/StochRsi.StaticSeries.Tests.cs index 71cdf7289..2efbd0983 100644 --- a/tests/indicators/s-z/StochRsi/StochRsi.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/StochRsi/StochRsi.StaticSeries.Tests.cs @@ -12,7 +12,7 @@ public override void Standard() // Fast RSI int smoothPeriods = 1; IReadOnlyList results = - Quotes.GetStochRsi(rsiPeriods, stochPeriods, signalPeriods, smoothPeriods); + Quotes.ToStochRsi(rsiPeriods, stochPeriods, signalPeriods, smoothPeriods); // assertions @@ -48,7 +48,7 @@ public void SlowRsi() int smoothPeriods = 3; IReadOnlyList results = - Quotes.GetStochRsi(rsiPeriods, stochPeriods, signalPeriods, smoothPeriods); + Quotes.ToStochRsi(rsiPeriods, stochPeriods, signalPeriods, smoothPeriods); // assertions @@ -80,7 +80,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetStochRsi(14, 14, 3); + .ToStochRsi(14, 14, 3); Assert.AreEqual(502, results.Count); Assert.AreEqual(475, results.Count(x => x.StochRsi != null)); @@ -92,7 +92,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetStochRsi(14, 14, 3); + .ToStochRsi(14, 14, 3); Assert.AreEqual(502, results.Count); Assert.AreEqual(474, results.Count(x => x.StochRsi != null)); @@ -102,7 +102,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetStochRsi(14, 14, 3, 3) + .ToStochRsi(14, 14, 3, 3) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -113,7 +113,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetStochRsi(15, 20, 3, 2); + .ToStochRsi(15, 20, 3, 2); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.StochRsi is double.NaN)); @@ -123,12 +123,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetStochRsi(10, 20, 3); + .ToStochRsi(10, 20, 3); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetStochRsi(8, 13, 2); + .ToStochRsi(8, 13, 2); Assert.AreEqual(1, r1.Count); } @@ -142,7 +142,7 @@ public void Removed() int smoothPeriods = 3; IReadOnlyList results = Quotes - .GetStochRsi(rsiPeriods, stochPeriods, signalPeriods, smoothPeriods) + .ToStochRsi(rsiPeriods, stochPeriods, signalPeriods, smoothPeriods) .RemoveWarmupPeriods(); // assertions @@ -159,18 +159,18 @@ public void Exceptions() { // bad RSI period Assert.ThrowsException(() => - Quotes.GetStochRsi(0, 14, 3)); + Quotes.ToStochRsi(0, 14, 3)); // bad STO period Assert.ThrowsException(() => - Quotes.GetStochRsi(14, 0, 3, 3)); + Quotes.ToStochRsi(14, 0, 3, 3)); // bad STO signal period Assert.ThrowsException(() => - Quotes.GetStochRsi(14, 14, 0)); + Quotes.ToStochRsi(14, 14, 0)); // bad STO smoothing period Assert.ThrowsException(() => - Quotes.GetStochRsi(14, 14, 3, 0)); + Quotes.ToStochRsi(14, 14, 3, 0)); } } diff --git a/tests/indicators/s-z/SuperTrend/SuperTrend.StaticSeries.Tests.cs b/tests/indicators/s-z/SuperTrend/SuperTrend.StaticSeries.Tests.cs index 31860967a..0732cab82 100644 --- a/tests/indicators/s-z/SuperTrend/SuperTrend.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/SuperTrend/SuperTrend.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public override void Standard() const double multiplier = 3; IReadOnlyList results = Quotes - .GetSuperTrend(lookbackPeriods, multiplier); + .ToSuperTrend(lookbackPeriods, multiplier); // proper quantities Assert.AreEqual(502, results.Count); @@ -54,7 +54,7 @@ public void Bitcoin() IEnumerable h = Data.GetBitcoin(); IReadOnlyList results = h - .GetSuperTrend(); + .ToSuperTrend(); Assert.AreEqual(1246, results.Count); @@ -66,7 +66,7 @@ public void Bitcoin() public override void BadData() { IReadOnlyList r = BadQuotes - .GetSuperTrend(7); + .ToSuperTrend(7); Assert.AreEqual(502, r.Count); } @@ -75,12 +75,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetSuperTrend(); + .ToSuperTrend(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetSuperTrend(); + .ToSuperTrend(); Assert.AreEqual(1, r1.Count); } @@ -92,7 +92,7 @@ public void Condense() double multiplier = 3; IReadOnlyList results = Quotes - .GetSuperTrend(lookbackPeriods, multiplier) + .ToSuperTrend(lookbackPeriods, multiplier) .Condense(); // assertions @@ -111,7 +111,7 @@ public void Removed() double multiplier = 3; IReadOnlyList results = Quotes - .GetSuperTrend(lookbackPeriods, multiplier) + .ToSuperTrend(lookbackPeriods, multiplier) .RemoveWarmupPeriods(); // assertions @@ -128,10 +128,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetSuperTrend(1)); + Quotes.ToSuperTrend(1)); // bad multiplier Assert.ThrowsException(() => - Quotes.GetSuperTrend(7, 0)); + Quotes.ToSuperTrend(7, 0)); } } diff --git a/tests/indicators/s-z/T3/T3.StaticSeries.Tests.cs b/tests/indicators/s-z/T3/T3.StaticSeries.Tests.cs index 5b10b3763..5cb40775b 100644 --- a/tests/indicators/s-z/T3/T3.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/T3/T3.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class T3 : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetT3(); + .ToT3(); // proper quantities Assert.AreEqual(502, results.Count); @@ -38,7 +38,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetT3(); + .ToT3(); Assert.AreEqual(502, results.Count); Assert.AreEqual(502, results.Count(x => x.T3 != null)); @@ -49,7 +49,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetT3(); + .ToT3(); Assert.AreEqual(502, results.Count); Assert.AreEqual(501, results.Count(x => x.T3 != null)); @@ -59,7 +59,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetT3() + .ToT3() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -69,7 +69,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetT3(); + .ToT3(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.T3 is double.NaN)); @@ -79,12 +79,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetT3(); + .ToT3(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetT3(); + .ToT3(); Assert.AreEqual(1, r1.Count); } @@ -94,10 +94,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetT3(0)); + Quotes.ToT3(0)); // bad volume factor Assert.ThrowsException(() => - Quotes.GetT3(25, 0)); + Quotes.ToT3(25, 0)); } } diff --git a/tests/indicators/s-z/Tema/Tema.StaticSeries.Tests.cs b/tests/indicators/s-z/Tema/Tema.StaticSeries.Tests.cs index 2878835ae..23e39b123 100644 --- a/tests/indicators/s-z/Tema/Tema.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Tema/Tema.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Tema : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetTema(20); + .ToTema(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -32,7 +32,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetTema(20); + .ToTema(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Tema != null)); @@ -43,7 +43,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetTema(20); + .ToTema(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Tema != null)); @@ -53,7 +53,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetTema(20) + .ToTema(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -64,7 +64,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetTema(15); + .ToTema(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Tema is double.NaN)); @@ -74,12 +74,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetTema(5); + .ToTema(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetTema(5); + .ToTema(5); Assert.AreEqual(1, r1.Count); } @@ -88,7 +88,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetTema(20) + .ToTema(20) .RemoveWarmupPeriods(); // assertions @@ -102,5 +102,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetTema(0)); + => Quotes.ToTema(0)); } diff --git a/tests/indicators/s-z/Tr/Tr.StaticSeries.Tests.cs b/tests/indicators/s-z/Tr/Tr.StaticSeries.Tests.cs index 1e5a2b71d..e44f90c03 100644 --- a/tests/indicators/s-z/Tr/Tr.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Tr/Tr.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Tr : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetTr(); + .ToTr(); // proper quantities Assert.AreEqual(502, results.Count); @@ -41,11 +41,11 @@ public void Chainor() { // same as ATR IReadOnlyList results = Quotes - .GetTr() - .GetSmma(14); + .ToTr() + .ToSmma(14); IReadOnlyList atrResults = Quotes - .GetAtr(); + .ToAtr(); for (int i = 0; i < results.Count; i++) { @@ -61,7 +61,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetTr(); + .ToTr(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Tr is double.NaN)); @@ -71,12 +71,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetTr(); + .ToTr(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetTr(); + .ToTr(); Assert.AreEqual(1, r1.Count); } diff --git a/tests/indicators/s-z/Tr/Tr.StreamHub.Tests.cs b/tests/indicators/s-z/Tr/Tr.StreamHub.Tests.cs index 3b94e3cd0..8225ac7f0 100644 --- a/tests/indicators/s-z/Tr/Tr.StreamHub.Tests.cs +++ b/tests/indicators/s-z/Tr/Tr.StreamHub.Tests.cs @@ -56,7 +56,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetTr(); + .ToTr(); // assert, should equal series streamList.Should().HaveCount(length - 1); @@ -102,7 +102,7 @@ IReadOnlyList streamList // time-series, for comparison IReadOnlyList seriesList = quotesList - .GetTr() + .ToTr() .ToSma(smaPeriods); // assert, should equal series diff --git a/tests/indicators/s-z/Trix/Trix.StaticSeries.Tests.cs b/tests/indicators/s-z/Trix/Trix.StaticSeries.Tests.cs index 88b041932..626d544b5 100644 --- a/tests/indicators/s-z/Trix/Trix.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Trix/Trix.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Trix : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetTrix(20); + .ToTrix(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -37,7 +37,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetTrix(20); + .ToTrix(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Trix != null)); @@ -48,7 +48,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetTrix(20); + .ToTrix(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(481, results.Count(x => x.Trix != null)); @@ -58,7 +58,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetTrix(20) + .ToTrix(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -69,7 +69,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetTrix(15); + .ToTrix(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Trix is double.NaN)); @@ -79,12 +79,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetTrix(5); + .ToTrix(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetTrix(5); + .ToTrix(5); Assert.AreEqual(1, r1.Count); } @@ -93,7 +93,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetTrix(20) + .ToTrix(20) .RemoveWarmupPeriods(); // assertions @@ -108,5 +108,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetTrix(0)); + => Quotes.ToTrix(0)); } diff --git a/tests/indicators/s-z/Tsi/Tsi.StaticSeries.Tests.cs b/tests/indicators/s-z/Tsi/Tsi.StaticSeries.Tests.cs index 1557345d0..ec96ba655 100644 --- a/tests/indicators/s-z/Tsi/Tsi.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Tsi/Tsi.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Tsi : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetTsi(); + .ToTsi(); // proper quantities Assert.AreEqual(502, results.Count); @@ -45,7 +45,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetTsi(); + .ToTsi(); Assert.AreEqual(502, results.Count); Assert.AreEqual(465, results.Count(x => x.Tsi != null)); @@ -56,7 +56,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetTsi(); + .ToTsi(); Assert.AreEqual(502, results.Count); Assert.AreEqual(464, results.Count(x => x.Tsi != null)); @@ -66,7 +66,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetTsi() + .ToTsi() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -77,7 +77,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetTsi(); + .ToTsi(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Tsi is double.NaN)); @@ -87,7 +87,7 @@ public override void BadData() public void BigData() { IReadOnlyList r = BigQuotes - .GetTsi(); + .ToTsi(); Assert.AreEqual(1246, r.Count); } @@ -96,12 +96,12 @@ public void BigData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetTsi(); + .ToTsi(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetTsi(); + .ToTsi(); Assert.AreEqual(1, r1.Count); } @@ -110,7 +110,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetTsi() + .ToTsi() .RemoveWarmupPeriods(); // assertions @@ -126,14 +126,14 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetTsi(0)); + Quotes.ToTsi(0)); // bad smoothing period Assert.ThrowsException(() => - Quotes.GetTsi(25, 0)); + Quotes.ToTsi(25, 0)); // bad signal period Assert.ThrowsException(() => - Quotes.GetTsi(25, 13, -1)); + Quotes.ToTsi(25, 13, -1)); } } diff --git a/tests/indicators/s-z/UlcerIndex/UlcerIndex.StaticSeries.Tests.cs b/tests/indicators/s-z/UlcerIndex/UlcerIndex.StaticSeries.Tests.cs index d38b6646b..8e08fa5f7 100644 --- a/tests/indicators/s-z/UlcerIndex/UlcerIndex.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/UlcerIndex/UlcerIndex.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class UlcerIndex : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetUlcerIndex(); + .ToUlcerIndex(); // proper quantities Assert.AreEqual(502, results.Count); @@ -23,7 +23,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetUlcerIndex(); + .ToUlcerIndex(); Assert.AreEqual(502, results.Count); Assert.AreEqual(489, results.Count(x => x.UlcerIndex != null)); @@ -34,7 +34,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetUlcerIndex(); + .ToUlcerIndex(); Assert.AreEqual(502, results.Count); Assert.AreEqual(488, results.Count(x => x.UlcerIndex != null)); @@ -44,7 +44,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetUlcerIndex() + .ToUlcerIndex() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -55,7 +55,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetUlcerIndex(15); + .ToUlcerIndex(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.UlcerIndex is double.NaN)); @@ -65,12 +65,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetUlcerIndex(); + .ToUlcerIndex(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetUlcerIndex(); + .ToUlcerIndex(); Assert.AreEqual(1, r1.Count); } @@ -79,7 +79,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetUlcerIndex() + .ToUlcerIndex() .RemoveWarmupPeriods(); // assertions @@ -93,5 +93,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetUlcerIndex(0)); + => Quotes.ToUlcerIndex(0)); } diff --git a/tests/indicators/s-z/Ultimate/Ultimate.StaticSeries.Tests.cs b/tests/indicators/s-z/Ultimate/Ultimate.StaticSeries.Tests.cs index e2ab1a19a..8571195da 100644 --- a/tests/indicators/s-z/Ultimate/Ultimate.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Ultimate/Ultimate.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Ultimate : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetUltimate(); + .ToUltimate(); // proper quantities Assert.AreEqual(502, results.Count); @@ -28,7 +28,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetUltimate() + .ToUltimate() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -39,7 +39,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetUltimate(1, 2, 3); + .ToUltimate(1, 2, 3); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Ultimate is double.NaN)); @@ -49,12 +49,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetUltimate(); + .ToUltimate(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetUltimate(); + .ToUltimate(); Assert.AreEqual(1, r1.Count); } @@ -63,7 +63,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetUltimate() + .ToUltimate() .RemoveWarmupPeriods(); // assertions @@ -78,14 +78,14 @@ public void Exceptions() { // bad short period Assert.ThrowsException(() => - Quotes.GetUltimate(0)); + Quotes.ToUltimate(0)); // bad middle period Assert.ThrowsException(() => - Quotes.GetUltimate(7, 6)); + Quotes.ToUltimate(7, 6)); // bad long period Assert.ThrowsException(() => - Quotes.GetUltimate(7, 14, 11)); + Quotes.ToUltimate(7, 14, 11)); } } diff --git a/tests/indicators/s-z/VolatilityStop/VolatilityStop.StaticSeries.Tests.cs b/tests/indicators/s-z/VolatilityStop/VolatilityStop.StaticSeries.Tests.cs index 5e5198956..66687b868 100644 --- a/tests/indicators/s-z/VolatilityStop/VolatilityStop.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/VolatilityStop/VolatilityStop.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class VolatilityStop : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = - Quotes.GetVolatilityStop(14); + Quotes.ToVolatilityStop(14); // proper quantities Assert.AreEqual(502, results.Count); @@ -64,7 +64,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetVolatilityStop() + .ToVolatilityStop() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -75,7 +75,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetVolatilityStop(); + .ToVolatilityStop(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Sar is double.NaN)); @@ -85,12 +85,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetVolatilityStop(); + .ToVolatilityStop(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetVolatilityStop(); + .ToVolatilityStop(); Assert.AreEqual(1, r1.Count); } @@ -99,7 +99,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetVolatilityStop(14) + .ToVolatilityStop(14) .RemoveWarmupPeriods(); // assertions @@ -115,10 +115,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() => - Quotes.GetVolatilityStop(1)); + Quotes.ToVolatilityStop(1)); // bad multiplier Assert.ThrowsException(() => - Quotes.GetVolatilityStop(20, 0)); + Quotes.ToVolatilityStop(20, 0)); } } diff --git a/tests/indicators/s-z/Vortex/Vortex.StaticSeries.Tests.cs b/tests/indicators/s-z/Vortex/Vortex.StaticSeries.Tests.cs index 8ef219ea8..389863567 100644 --- a/tests/indicators/s-z/Vortex/Vortex.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Vortex/Vortex.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Vortex : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetVortex(14); + .ToVortex(14); // proper quantities Assert.AreEqual(502, results.Count); @@ -39,7 +39,7 @@ public override void Standard() public override void BadData() { IReadOnlyList r = BadQuotes - .GetVortex(20); + .ToVortex(20); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Pvi is double.NaN)); @@ -49,12 +49,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetVortex(5); + .ToVortex(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetVortex(5); + .ToVortex(5); Assert.AreEqual(1, r1.Count); } @@ -63,7 +63,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetVortex(14) + .ToVortex(14) .Condense(); // assertions @@ -78,7 +78,7 @@ public void Condense() public void Removed() { IReadOnlyList results = Quotes - .GetVortex(14) + .ToVortex(14) .RemoveWarmupPeriods(); // assertions @@ -93,5 +93,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetVortex(1)); + => Quotes.ToVortex(1)); } diff --git a/tests/indicators/s-z/Vwap/Vwap.StaticSeries.Tests.cs b/tests/indicators/s-z/Vwap/Vwap.StaticSeries.Tests.cs index 041b4ea1c..998368ce2 100644 --- a/tests/indicators/s-z/Vwap/Vwap.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Vwap/Vwap.StaticSeries.Tests.cs @@ -10,7 +10,7 @@ public class Vwap : StaticSeriesTestBase [TestMethod] public override void Standard() { - IReadOnlyList results = intraday.GetVwap(); + IReadOnlyList results = intraday.ToVwap(); // proper quantities Assert.AreEqual(391, results.Count); @@ -37,7 +37,7 @@ public void WithStartDate() DateTime.ParseExact("2020-12-15 10:00", "yyyy-MM-dd h:mm", englishCulture); IReadOnlyList results = intraday - .GetVwap(startDate); + .ToVwap(startDate); // proper quantities Assert.AreEqual(391, results.Count); @@ -61,7 +61,7 @@ public void WithStartDate() public void Chainor() { IReadOnlyList results = Quotes - .GetVwap() + .ToVwap() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -72,7 +72,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetVwap(); + .ToVwap(); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Vwap is double.NaN)); @@ -82,12 +82,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetVwap(); + .ToVwap(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetVwap(); + .ToVwap(); Assert.AreEqual(1, r1.Count); } @@ -97,7 +97,7 @@ public void Removed() { // no start date IReadOnlyList results = intraday - .GetVwap() + .ToVwap() .RemoveWarmupPeriods(); // assertions @@ -111,7 +111,7 @@ public void Removed() DateTime.ParseExact("2020-12-15 10:00", "yyyy-MM-dd h:mm", englishCulture); IReadOnlyList sdResults = intraday - .GetVwap(startDate) + .ToVwap(startDate) .RemoveWarmupPeriods(); // assertions @@ -129,6 +129,6 @@ public void Exceptions() DateTime.ParseExact("2000-12-15", "yyyy-MM-dd", englishCulture); Assert.ThrowsException(() => - Quotes.GetVwap(startDate)); + Quotes.ToVwap(startDate)); } } diff --git a/tests/indicators/s-z/Vwma/Vwma.StaticSeries.Tests.cs b/tests/indicators/s-z/Vwma/Vwma.StaticSeries.Tests.cs index 8b3e75ec0..8cfc11cc0 100644 --- a/tests/indicators/s-z/Vwma/Vwma.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Vwma/Vwma.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Vwma : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetVwma(10); + .ToVwma(10); // proper quantities Assert.AreEqual(502, results.Count); @@ -28,7 +28,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetVwma(10) + .ToVwma(10) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -39,7 +39,7 @@ public void Chainor() public override void BadData() { IReadOnlyList r = BadQuotes - .GetVwma(15); + .ToVwma(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Vwma is double.NaN)); @@ -49,12 +49,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetVwma(4); + .ToVwma(4); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetVwma(4); + .ToVwma(4); Assert.AreEqual(1, r1.Count); } @@ -63,7 +63,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetVwma(10) + .ToVwma(10) .RemoveWarmupPeriods(); // assertions @@ -77,5 +77,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetVwma(0)); + => Quotes.ToVwma(0)); } diff --git a/tests/indicators/s-z/WilliamsR/WilliamsR.StaticSeries.Tests.cs b/tests/indicators/s-z/WilliamsR/WilliamsR.StaticSeries.Tests.cs index cee2ffdea..c0af8b3e2 100644 --- a/tests/indicators/s-z/WilliamsR/WilliamsR.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/WilliamsR/WilliamsR.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class WilliamsR : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetWilliamsR(); + .ToWilliamsR(); // proper quantities Assert.AreEqual(502, results.Count); @@ -37,7 +37,7 @@ public override void Standard() public void Chainor() { IReadOnlyList results = Quotes - .GetWilliamsR() + .ToWilliamsR() .ToSma(10); Assert.AreEqual(502, results.Count); @@ -48,7 +48,7 @@ public void Chainor() public override void BadData() { IReadOnlyList results = BadQuotes - .GetWilliamsR(20); + .ToWilliamsR(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(0, results.Count(x => x.WilliamsR is double.NaN)); @@ -58,12 +58,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetWilliamsR(); + .ToWilliamsR(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetWilliamsR(); + .ToWilliamsR(); Assert.AreEqual(1, r1.Count); } @@ -72,7 +72,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetWilliamsR() + .ToWilliamsR() .RemoveWarmupPeriods(); // assertions @@ -87,7 +87,7 @@ public void Boundary() { IReadOnlyList results = Data .GetRandom(2500) - .GetWilliamsR(); + .ToWilliamsR(); // analyze boundary for (int i = 0; i < results.Count; i++) @@ -116,7 +116,7 @@ public void Issue1127() // get indicators IReadOnlyList resultsList = quotesList - .GetWilliamsR(); + .ToWilliamsR(); Console.WriteLine($"%R from {length} quotes."); @@ -140,5 +140,5 @@ public void Issue1127() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetWilliamsR(0)); + => Quotes.ToWilliamsR(0)); } diff --git a/tests/indicators/s-z/Wma/Wma.StaticSeries.Tests.cs b/tests/indicators/s-z/Wma/Wma.StaticSeries.Tests.cs index adaa328d7..842b28399 100644 --- a/tests/indicators/s-z/Wma/Wma.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/Wma/Wma.StaticSeries.Tests.cs @@ -7,7 +7,7 @@ public class Wma : StaticSeriesTestBase public override void Standard() { IReadOnlyList results = Quotes - .GetWma(20); + .ToWma(20); // proper quantities Assert.AreEqual(502, results.Count); @@ -26,7 +26,7 @@ public void UseReusable() { IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetWma(20); + .ToWma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(483, results.Count(x => x.Wma != null)); @@ -37,7 +37,7 @@ public void Chainee() { IReadOnlyList results = Quotes .ToSma(2) - .GetWma(20); + .ToWma(20); Assert.AreEqual(502, results.Count); Assert.AreEqual(482, results.Count(x => x.Wma != null)); @@ -47,7 +47,7 @@ public void Chainee() public void Chainor() { IReadOnlyList results = Quotes - .GetWma(20) + .ToWma(20) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -58,11 +58,11 @@ public void Chainor() public void Chaining() { IReadOnlyList standard = Quotes - .GetWma(17); + .ToWma(17); IReadOnlyList results = Quotes .Use(CandlePart.Close) - .GetWma(17); + .ToWma(17); // assertions for (int i = 0; i < results.Count; i++) @@ -79,7 +79,7 @@ public void Chaining() public override void BadData() { IReadOnlyList r = BadQuotes - .GetWma(15); + .ToWma(15); Assert.AreEqual(502, r.Count); Assert.AreEqual(0, r.Count(x => x.Wma is double.NaN)); @@ -89,12 +89,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetWma(5); + .ToWma(5); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetWma(5); + .ToWma(5); Assert.AreEqual(1, r1.Count); } @@ -103,7 +103,7 @@ public override void NoQuotes() public void Removed() { IReadOnlyList results = Quotes - .GetWma(20) + .ToWma(20) .RemoveWarmupPeriods(); // assertions @@ -117,5 +117,5 @@ public void Removed() [TestMethod] public void Exceptions() => Assert.ThrowsException(() - => Quotes.GetWma(0)); + => Quotes.ToWma(0)); } diff --git a/tests/indicators/s-z/ZigZag/ZigZag.StaticSeries.Tests.cs b/tests/indicators/s-z/ZigZag/ZigZag.StaticSeries.Tests.cs index 0a57b7b76..3994d2863 100644 --- a/tests/indicators/s-z/ZigZag/ZigZag.StaticSeries.Tests.cs +++ b/tests/indicators/s-z/ZigZag/ZigZag.StaticSeries.Tests.cs @@ -9,7 +9,7 @@ public class ZigZag : StaticSeriesTestBase public override void Standard() // on Close { IReadOnlyList results = - Quotes.GetZigZag(EndType.Close, 3); + Quotes.ToZigZag(EndType.Close, 3); // proper quantities Assert.AreEqual(502, results.Count); @@ -60,7 +60,7 @@ public override void Standard() // on Close public void StandardHighLow() { IReadOnlyList results = - Quotes.GetZigZag(EndType.HighLow, 3); + Quotes.ToZigZag(EndType.HighLow, 3); // proper quantities Assert.AreEqual(502, results.Count); @@ -111,7 +111,7 @@ public void StandardHighLow() public void Chainor() { IReadOnlyList results = Quotes - .GetZigZag(EndType.Close, 3) + .ToZigZag(EndType.Close, 3) .ToSma(10); Assert.AreEqual(502, results.Count); @@ -128,7 +128,7 @@ public void NoEntry() .DeserializeObject>(json); IReadOnlyList results = quotes - .GetZigZag(); + .ToZigZag(); Assert.AreEqual(0, results.Count(x => x.PointType != null)); } @@ -143,7 +143,7 @@ public void Issue632() .DeserializeObject>(json); IReadOnlyList resultsList = quotesList - .GetZigZag(); + .ToZigZag(); Assert.AreEqual(17, resultsList.Count); } @@ -152,12 +152,12 @@ public void Issue632() public override void BadData() { IReadOnlyList r1 = BadQuotes - .GetZigZag(); + .ToZigZag(); Assert.AreEqual(502, r1.Count); IReadOnlyList r2 = BadQuotes - .GetZigZag(EndType.HighLow); + .ToZigZag(EndType.HighLow); Assert.AreEqual(502, r2.Count); } @@ -166,12 +166,12 @@ public override void BadData() public override void NoQuotes() { IReadOnlyList r0 = Noquotes - .GetZigZag(); + .ToZigZag(); Assert.AreEqual(0, r0.Count); IReadOnlyList r1 = Onequote - .GetZigZag(); + .ToZigZag(); Assert.AreEqual(1, r1.Count); } @@ -180,7 +180,7 @@ public override void NoQuotes() public void Condense() { IReadOnlyList results = Quotes - .GetZigZag(EndType.Close, 3) + .ToZigZag(EndType.Close, 3) .Condense(); // assertions @@ -196,12 +196,12 @@ public void SchrodingerScenario() .DeserializeObject>(json) .OrderBy(x => x.Timestamp); - IReadOnlyList r1 = h.GetZigZag(EndType.Close, 0.25m).ToList(); + IReadOnlyList r1 = h.ToZigZag(EndType.Close, 0.25m).ToList(); Assert.AreEqual(342, r1.Count); // first period has High/Low that exceeds threhold // where it is both a H and L pivot simultaenously - IReadOnlyList r2 = h.GetZigZag(EndType.HighLow, 3).ToList(); + IReadOnlyList r2 = h.ToZigZag(EndType.HighLow, 3).ToList(); Assert.AreEqual(342, r2.Count); } @@ -210,10 +210,10 @@ public void Exceptions() { // bad lookback period Assert.ThrowsException(() - => Quotes.GetZigZag(EndType.Close, 0)); + => Quotes.ToZigZag(EndType.Close, 0)); // bad end type Assert.ThrowsException(() - => Quotes.GetZigZag((EndType)int.MaxValue, 2)); + => Quotes.ToZigZag((EndType)int.MaxValue, 2)); } } diff --git a/tests/other/Convergence.Tests.cs b/tests/other/Convergence.Tests.cs index 232a52a47..541bb7cca 100644 --- a/tests/other/Convergence.Tests.cs +++ b/tests/other/Convergence.Tests.cs @@ -12,7 +12,7 @@ public void Adx() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetAdx(); + IReadOnlyList r = qts.ToAdx(); AdxResult l = r[^1]; Console.WriteLine($"ADX(14) on {l.Timestamp:d} with {qts.Count,4} historical qts: {l.Adx:N8}"); @@ -25,7 +25,7 @@ public void Alligator() foreach (int qty in QuotesQuantities) { IReadOnlyList quotes = Data.GetLongish(qty); - IReadOnlyList r = quotes.GetAlligator(); + IReadOnlyList r = quotes.ToAlligator(); AlligatorResult l = r[^1]; Console.WriteLine( @@ -40,7 +40,7 @@ public void Atr() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetAtr(); + IReadOnlyList r = qts.ToAtr(); AtrResult l = r[^1]; Console.WriteLine($"ATR(14) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Atr:N8}"); @@ -53,7 +53,7 @@ public void ChaikinOsc() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetChaikinOsc(); + IReadOnlyList r = qts.ToChaikinOsc(); ChaikinOscResult l = r[^1]; Console.WriteLine($"CHAIKIN OSC on {l.Timestamp:d} with {qts.Count,4} periods: {l.Oscillator:N8}"); @@ -66,7 +66,7 @@ public void ConnorsRsi() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetConnorsRsi(3, 2, 10); + IReadOnlyList r = qts.ToConnorsRsi(3, 2, 10); ConnorsRsiResult l = r[^1]; Console.WriteLine($"CRSI on {l.Timestamp:d} with {qts.Count,4} periods: {l.ConnorsRsi:N8}"); @@ -79,7 +79,7 @@ public void Dema() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetDema(15); + IReadOnlyList r = qts.ToDema(15); DemaResult l = r[^1]; Console.WriteLine($"DEMA(15) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Dema:N8}"); @@ -92,7 +92,7 @@ public void Dynamic() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetDynamic(100); + IReadOnlyList r = qts.ToDynamic(100); DynamicResult l = r[^1]; Console.WriteLine($"DYNAMIC(15) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Dynamic:N8}"); @@ -118,7 +118,7 @@ public void FisherTransform() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetFisherTransform(); + IReadOnlyList r = qts.ToFisherTransform(); FisherTransformResult l = r[^1]; Console.WriteLine($"FT(10) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Fisher:N8}"); @@ -131,7 +131,7 @@ public void Gator() foreach (int qty in QuotesQuantities) { IReadOnlyList quotes = Data.GetLongish(qty); - IReadOnlyList r = quotes.GetGator(); + IReadOnlyList r = quotes.ToGator(); GatorResult l = r[^1]; Console.WriteLine( @@ -146,7 +146,7 @@ public void HtTrendline() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetHtTrendline(); + IReadOnlyList r = qts.ToHtTrendline(); HtlResult l = r[^1]; Console.WriteLine($"HTL on {l.Timestamp:d} with {qts.Count,4} periods: {l.Trendline:N8}"); @@ -159,7 +159,7 @@ public void Kama() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetKama(); + IReadOnlyList r = qts.ToKama(); KamaResult l = r[^1]; Console.WriteLine($"KAMA(10) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Kama:N8}"); @@ -172,7 +172,7 @@ public void Keltner() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetKeltner(100); + IReadOnlyList r = qts.ToKeltner(100); KeltnerResult l = r[^1]; Console.WriteLine($"KC-UP on {l.Timestamp:d} with {qts.Count,4} periods: {l.UpperBand:N8}"); @@ -185,7 +185,7 @@ public void Macd() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(15 + qty); - IReadOnlyList r = qts.GetMacd(); + IReadOnlyList r = qts.ToMacd(); MacdResult l = r[^1]; Console.WriteLine($"MACD on {l.Timestamp:d} with {qts.Count,4} periods: {l.Macd:N8}"); @@ -198,7 +198,7 @@ public void Mama() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetMama(); + IReadOnlyList r = qts.ToMama(); MamaResult l = r[^1]; Console.WriteLine($"MAMA on {l.Timestamp:d} with {qts.Count,4} periods: {l.Mama:N8}"); @@ -211,7 +211,7 @@ public void Pmo() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetPmo(); + IReadOnlyList r = qts.ToPmo(); PmoResult l = r[^1]; Console.WriteLine($"PMO on {l.Timestamp:d} with {qts.Count,4} periods: {l.Pmo:N8}"); @@ -224,7 +224,7 @@ public void Pvo() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetPvo(); + IReadOnlyList r = qts.ToPvo(); PvoResult l = r[^1]; Console.WriteLine($"PVO on {l.Timestamp:d} with {qts.Count,4} periods: {l.Pvo:N8}"); @@ -237,7 +237,7 @@ public void Rsi() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetRsi(); + IReadOnlyList r = qts.ToRsi(); RsiResult l = r[^1]; Console.WriteLine($"RSI(14) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Rsi:N8}"); @@ -250,7 +250,7 @@ public void Smi() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetDefault(qty); - IReadOnlyList r = qts.GetSmi(14, 20, 5); + IReadOnlyList r = qts.ToSmi(14, 20, 5); SmiResult l = r[^1]; Console.WriteLine($"SMI on {l.Timestamp:d} with {qts.Count,4} periods: {l.Smi:N8}"); @@ -263,7 +263,7 @@ public void Smma() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetSmma(15); + IReadOnlyList r = qts.ToSmma(15); SmmaResult l = r[^1]; Console.WriteLine($"SMMA(15) on {l.Timestamp:d} with {qts.Count,4} periods: {l.Smma:N8}"); @@ -276,7 +276,7 @@ public void StarcBands() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetStarcBands(20); + IReadOnlyList r = qts.ToStarcBands(20); StarcBandsResult l = r[^1]; Console.WriteLine($"STARC UPPER on {l.Timestamp:d} with {qts.Count,4} periods: {l.UpperBand:N8}"); @@ -289,7 +289,7 @@ public void StochRsi() foreach (int qty in QuotesQuantities.Where(x => x <= 502)) { IReadOnlyList qts = Data.GetDefault(qty); - IReadOnlyList r = qts.GetStochRsi(14, 14, 3); + IReadOnlyList r = qts.ToStochRsi(14, 14, 3); StochRsiResult l = r[^1]; Console.WriteLine($"SRSI on {l.Timestamp:d} with {qts.Count,4} periods: {l.StochRsi:N8}"); @@ -302,7 +302,7 @@ public void T3() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetT3(20); + IReadOnlyList r = qts.ToT3(20); T3Result l = r[^1]; Console.WriteLine($"T3 on {l.Timestamp:d} with {qts.Count,4} periods: {l.T3:N8}"); @@ -315,7 +315,7 @@ public void Tema() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetTema(15); + IReadOnlyList r = qts.ToTema(15); TemaResult l = r[^1]; Console.WriteLine($"TEMA on {l.Timestamp:d} with {qts.Count,4} periods: {l.Tema:N8}"); @@ -328,7 +328,7 @@ public void Trix() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetTrix(15); + IReadOnlyList r = qts.ToTrix(15); TrixResult l = r[^1]; Console.WriteLine($"TRIX on {l.Timestamp:d} with {qts.Count,4} periods: {l.Trix:N8}"); @@ -341,7 +341,7 @@ public void Tsi() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(20 + qty); - IReadOnlyList r = qts.GetTsi(); + IReadOnlyList r = qts.ToTsi(); TsiResult l = r[^1]; Console.WriteLine($"TSI on {l.Timestamp:d} with {qts.Count,4} periods: {l.Tsi:N8}"); @@ -354,7 +354,7 @@ public void Vortex() foreach (int qty in QuotesQuantities) { IReadOnlyList qts = Data.GetLongish(qty); - IReadOnlyList r = qts.GetVortex(14); + IReadOnlyList r = qts.ToVortex(14); VortexResult l = r[^1]; Console.WriteLine($"VI+ on {l.Timestamp:d} with {qts.Count,4} periods: {l.Pvi:N8}"); diff --git a/tests/other/PublicApi.Interface.Tests.cs b/tests/other/PublicApi.Interface.Tests.cs index 7e66e061e..1b307baed 100644 --- a/tests/other/PublicApi.Interface.Tests.cs +++ b/tests/other/PublicApi.Interface.Tests.cs @@ -99,14 +99,14 @@ public void StreamMany() // from quote provider provider.EndTransmission(); // get static equivalents for comparison - IEnumerable staticAdl = quotes.GetAdl(); - IReadOnlyList staticAtr = quotes.GetAtr(); - IReadOnlyList staticAtrStop = quotes.GetAtrStop(); - IEnumerable staticAlligator = quotes.GetAlligator(); + IEnumerable staticAdl = quotes.ToAdl(); + IReadOnlyList staticAtr = quotes.ToAtr(); + IReadOnlyList staticAtrStop = quotes.ToAtrStop(); + IEnumerable staticAlligator = quotes.ToAlligator(); IEnumerable staticEma = quotes.ToEma(20); IEnumerable staticQuotePart = quotes.Use(CandlePart.OHL3); IEnumerable staticSma = quotes.ToSma(20); - IReadOnlyList staticTr = quotes.GetTr(); + IReadOnlyList staticTr = quotes.ToTr(); // final results should persist in scope IReadOnlyList streamAdl = adlHub.Results; diff --git a/tests/performance/Perf.StaticSeries.cs b/tests/performance/Perf.StaticSeries.cs index cdecc570e..6892ef6e4 100644 --- a/tests/performance/Perf.StaticSeries.cs +++ b/tests/performance/Perf.StaticSeries.cs @@ -9,269 +9,269 @@ public class SeriesIndicators private static readonly IReadOnlyList o = Data.GetCompare(); [Benchmark] - public object GetAdl() => q.GetAdl(); + public object ToAdl() => q.ToAdl(); [Benchmark] - public object GetAdx() => q.GetAdx(); + public object ToAdx() => q.ToAdx(); [Benchmark] - public object GetAlligator() => q.GetAlligator(); + public object ToAlligator() => q.ToAlligator(); [Benchmark] - public object GetAlma() => q.GetAlma(); + public object ToAlma() => q.ToAlma(); [Benchmark] - public object GetAroon() => q.GetAroon(); + public object ToAroon() => q.ToAroon(); [Benchmark] - public object GetAtr() => q.GetAtr(); + public object ToAtr() => q.ToAtr(); [Benchmark] - public object GetAtrStop() => q.GetAtrStop(); + public object ToAtrStop() => q.ToAtrStop(); [Benchmark] - public object GetAwesome() => q.GetAwesome(); + public object ToAwesome() => q.ToAwesome(); [Benchmark] - public object GetBeta() => Indicator.GetBeta(q, o, 20, BetaType.Standard); + public object ToBeta() => Beta.ToBeta(q, o, 20, BetaType.Standard); [Benchmark] - public object GetBetaUp() => Indicator.GetBeta(q, o, 20, BetaType.Up); + public object ToBetaUp() => Beta.ToBeta(q, o, 20, BetaType.Up); [Benchmark] - public object GetBetaDown() => Indicator.GetBeta(q, o, 20, BetaType.Down); + public object ToBetaDown() => Beta.ToBeta(q, o, 20, BetaType.Down); [Benchmark] - public object GetBetaAll() => Indicator.GetBeta(q, o, 20, BetaType.All); + public object ToBetaAll() => Beta.ToBeta(q, o, 20, BetaType.All); [Benchmark] - public object GetBollingerBands() => q.GetBollingerBands(); + public object ToBollingerBands() => q.ToBollingerBands(); [Benchmark] - public object GetBop() => q.GetBop(); + public object ToBop() => q.ToBop(); [Benchmark] - public object GetCci() => q.GetCci(); + public object ToCci() => q.ToCci(); [Benchmark] - public object GetChaikinOsc() => q.GetChaikinOsc(); + public object ToChaikinOsc() => q.ToChaikinOsc(); [Benchmark] - public object GetChandelier() => q.GetChandelier(); + public object ToChandelier() => q.ToChandelier(); [Benchmark] - public object GetChop() => q.GetChop(); + public object ToChop() => q.ToChop(); [Benchmark] - public object GetCmf() => q.GetCmf(); + public object ToCmf() => q.ToCmf(); [Benchmark] - public object GetCmo() => q.GetCmo(14); + public object ToCmo() => q.ToCmo(14); [Benchmark] - public object GetConnorsRsi() => q.GetConnorsRsi(); + public object ToConnorsRsi() => q.ToConnorsRsi(); [Benchmark] - public object GetCorrelation() => q.GetCorrelation(o, 20); + public object ToCorrelation() => q.ToCorrelation(o, 20); [Benchmark] - public object GetDema() => q.GetDema(14); + public object ToDema() => q.ToDema(14); [Benchmark] - public object GetDoji() => q.GetDoji(); + public object ToDoji() => q.ToDoji(); [Benchmark] - public object GetDonchian() => q.GetDonchian(); + public object ToDonchian() => q.ToDonchian(); [Benchmark] - public object GetDpo() => q.GetDpo(14); + public object ToDpo() => q.ToDpo(14); [Benchmark] - public object GetDynamic() => q.GetDynamic(20); + public object ToDynamic() => q.ToDynamic(20); [Benchmark] - public object GetElderRay() => q.GetElderRay(); + public object ToElderRay() => q.ToElderRay(); [Benchmark] - public object GetEma() => q.ToEma(14); + public object ToEma() => q.ToEma(14); [Benchmark] - public object GetEpma() => q.GetEpma(14); + public object ToEpma() => q.ToEpma(14); [Benchmark] - public object GetFcb() => q.GetFcb(14); + public object ToFcb() => q.ToFcb(14); [Benchmark] - public object GetFisherTransform() => q.GetFisherTransform(10); + public object ToFisherTransform() => q.ToFisherTransform(10); [Benchmark] - public object GetForceIndex() => q.GetForceIndex(13); + public object ToForceIndex() => q.ToForceIndex(13); [Benchmark] - public object GetFractal() => q.GetFractal(); + public object ToFractal() => q.ToFractal(); [Benchmark] - public object GetGator() => q.GetGator(); + public object ToGator() => q.ToGator(); [Benchmark] - public object GetHeikinAshi() => q.GetHeikinAshi(); + public object ToHeikinAshi() => q.ToHeikinAshi(); [Benchmark] - public object GetHma() => q.GetHma(14); + public object ToHma() => q.ToHma(14); [Benchmark] - public object GetHtTrendline() => q.GetHtTrendline(); + public object ToHtTrendline() => q.ToHtTrendline(); [Benchmark] - public object GetHurst() => q.GetHurst(); + public object ToHurst() => q.ToHurst(); [Benchmark] - public object GetIchimoku() => q.GetIchimoku(); + public object ToIchimoku() => q.ToIchimoku(); [Benchmark] - public object GetKama() => q.GetKama(); + public object ToKama() => q.ToKama(); [Benchmark] - public object GetKlinger() => q.GetKvo(); + public object ToKlinger() => q.ToKvo(); [Benchmark] - public object GetKeltner() => q.GetKeltner(); + public object ToKeltner() => q.ToKeltner(); [Benchmark] - public object GetKvo() => q.GetKvo(); + public object ToKvo() => q.ToKvo(); [Benchmark] - public object GetMacd() => q.GetMacd(); + public object ToMacd() => q.ToMacd(); [Benchmark] - public object GetMaEnvelopes() => q.GetMaEnvelopes(20, 2.5, MaType.SMA); + public object ToMaEnvelopes() => q.ToMaEnvelopes(20, 2.5, MaType.SMA); [Benchmark] - public object GetMama() => q.GetMama(); + public object ToMama() => q.ToMama(); [Benchmark] - public object GetMarubozu() => q.GetMarubozu(); + public object ToMarubozu() => q.ToMarubozu(); [Benchmark] - public object GetMfi() => q.GetMfi(); + public object ToMfi() => q.ToMfi(); [Benchmark] - public object GetObv() => q.GetObv(); + public object ToObv() => q.ToObv(); [Benchmark] - public object GetParabolicSar() => q.GetParabolicSar(); + public object ToParabolicSar() => q.ToParabolicSar(); [Benchmark] - public object GetPivotPoints() => q.GetPivotPoints(PeriodSize.Month, PivotPointType.Standard); + public object ToPivotPoints() => q.ToPivotPoints(PeriodSize.Month, PivotPointType.Standard); [Benchmark] - public object GetPivots() => q.GetPivots(); + public object ToPivots() => q.ToPivots(); [Benchmark] - public object GetPmo() => q.GetPmo(); + public object ToPmo() => q.ToPmo(); [Benchmark] - public object GetPrs() => q.GetPrs(o); + public object ToPrs() => q.ToPrs(o); [Benchmark] - public object GetPvo() => q.GetPvo(); + public object ToPvo() => q.ToPvo(); [Benchmark] - public object GetRenko() => q.GetRenko(2.5m); + public object ToRenko() => q.ToRenko(2.5m); [Benchmark] - public object GetRenkoAtr() => q.GetRenko(14); + public object ToRenkoAtr() => q.ToRenko(14); [Benchmark] - public object GetRoc() => q.GetRoc(20); + public object ToRoc() => q.ToRoc(20); [Benchmark] - public object GetRocWb() => q.GetRocWb(12, 3, 12); + public object ToRocWb() => q.ToRocWb(12, 3, 12); [Benchmark] - public object GetRollingPivots() => q.GetRollingPivots(14, 1); + public object ToRollingPivots() => q.ToRollingPivots(14, 1); [Benchmark] - public object GetRsi() => q.GetRsi(); + public object ToRsi() => q.ToRsi(); [Benchmark] - public object GetSlope() => q.GetSlope(20); + public object ToSlope() => q.ToSlope(20); [Benchmark] - public object GetSma() => q.ToSma(10); + public object ToSma() => q.ToSma(10); [Benchmark] - public object GetSmaAnalysis() => q.GetSmaAnalysis(10); + public object ToSmaAnalysis() => q.ToSmaAnalysis(10); [Benchmark] - public object GetSmi() => q.GetSmi(5, 20, 5, 3); + public object ToSmi() => q.ToSmi(5, 20, 5, 3); [Benchmark] - public object GetSmma() => q.GetSmma(10); + public object ToSmma() => q.ToSmma(10); [Benchmark] - public object GetStarcBands() => q.GetStarcBands(10); + public object ToStarcBands() => q.ToStarcBands(10); [Benchmark] - public object GetStc() => q.GetStc(); + public object ToStc() => q.ToStc(); [Benchmark] - public object GetStdDev() => q.GetStdDev(20); + public object ToStdDev() => q.ToStdDev(20); [Benchmark] - public object GetStdDevChannels() => q.GetStdDevChannels(); + public object ToStdDevChannels() => q.ToStdDevChannels(); [Benchmark] - public object GetStoch() => q.GetStoch(); + public object ToStoch() => q.ToStoch(); [Benchmark] - public object GetStochSMMA() => q.GetStoch(9, 3, 3, 3, 2, MaType.SMMA); + public object ToStochSMMA() => q.ToStoch(9, 3, 3, 3, 2, MaType.SMMA); [Benchmark] - public object GetStochRsi() => q.GetStochRsi(14, 14, 3); + public object ToStochRsi() => q.ToStochRsi(14, 14, 3); [Benchmark] - public object GetSuperTrend() => q.GetSuperTrend(); + public object ToSuperTrend() => q.ToSuperTrend(); [Benchmark] - public object GetT3() => q.GetT3(); + public object ToT3() => q.ToT3(); [Benchmark] - public object GetTema() => q.GetTema(14); + public object ToTema() => q.ToTema(14); [Benchmark] - public object GetTr() => q.GetTr(); + public object ToTr() => q.ToTr(); [Benchmark] - public object GetTrix() => q.GetTrix(14); + public object ToTrix() => q.ToTrix(14); [Benchmark] - public object GetTsi() => q.GetTsi(); + public object ToTsi() => q.ToTsi(); [Benchmark] - public object GetUlcerIndex() => q.GetUlcerIndex(); + public object ToUlcerIndex() => q.ToUlcerIndex(); [Benchmark] - public object GetUltimate() => q.GetUltimate(); + public object ToUltimate() => q.ToUltimate(); [Benchmark] - public object GetVolatilityStop() => q.GetVolatilityStop(); + public object ToVolatilityStop() => q.ToVolatilityStop(); [Benchmark] - public object GetVortex() => q.GetVortex(14); + public object ToVortex() => q.ToVortex(14); [Benchmark] - public object GetVwap() => q.GetVwap(); + public object ToVwap() => q.ToVwap(); [Benchmark] - public object GetVwma() => q.GetVwma(14); + public object ToVwma() => q.ToVwma(14); [Benchmark] - public object GetWilliamsR() => q.GetWilliamsR(); + public object ToWilliamsR() => q.ToWilliamsR(); [Benchmark] - public object GetWma() => q.GetWma(14); + public object ToWma() => q.ToWma(14); [Benchmark] - public object GetZigZag() => q.GetZigZag(); + public object ToZigZag() => q.ToZigZag(); }