diff --git a/src/_common/ObsoleteV2.cs b/src/_common/ObsoleteV2.cs index 7428aee29..540e097b4 100644 --- a/src/_common/ObsoleteV2.cs +++ b/src/_common/ObsoleteV2.cs @@ -28,8 +28,8 @@ public static partial class Indicator [Obsolete("Rename 'ToTupleCollection(..)' to 'ToTupleChainable(..)' to fix.", false)] public static Collection<(DateTime Date, double Value)> ToTupleCollection( this IEnumerable reusable) - => reusable - .ToTupleChainable(); + => reusable + .ToTupleChainable(); [ExcludeFromCodeCoverage] [Obsolete("Rename 'ToTupleCollection(NullTo..)' to either 'ToTupleNaN(..)' or 'ToTupleNull(..)' to fix.", false)] @@ -50,6 +50,14 @@ public static partial class Indicator return results; } + // v2.4.10 + [ExcludeFromCodeCoverage] + [Obsolete("Change 'GetStarcBands()' to 'GetStarcBands(20)' to fix.", false)] + public static IEnumerable GetStarcBands( + this IEnumerable quotes) + where TQuote : IQuote + => quotes.GetStarcBands(20); + #pragma warning restore CA1002 // Do not expose generic lists } diff --git a/src/s-z/StarcBands/StarcBands.Api.cs b/src/s-z/StarcBands/StarcBands.Api.cs index 49094ef5e..ece5d9af0 100644 --- a/src/s-z/StarcBands/StarcBands.Api.cs +++ b/src/s-z/StarcBands/StarcBands.Api.cs @@ -8,7 +8,7 @@ public static partial class Indicator /// public static IEnumerable GetStarcBands( this IEnumerable quotes, - int smaPeriods = 20, + int smaPeriods, double multiplier = 2, int atrPeriods = 10) where TQuote : IQuote => quotes diff --git a/tests/indicators/s-z/StarcBands/StarcBands.Tests.cs b/tests/indicators/s-z/StarcBands/StarcBands.Tests.cs index 87e6ffbdc..d33ef73de 100644 --- a/tests/indicators/s-z/StarcBands/StarcBands.Tests.cs +++ b/tests/indicators/s-z/StarcBands/StarcBands.Tests.cs @@ -66,13 +66,13 @@ public void BadData() public void NoQuotes() { List r0 = noquotes - .GetStarcBands() + .GetStarcBands(10) .ToList(); Assert.AreEqual(0, r0.Count); List r1 = onequote - .GetStarcBands() + .GetStarcBands(10) .ToList(); Assert.AreEqual(1, r1.Count); diff --git a/tests/performance/Perf.Indicators.cs b/tests/performance/Perf.Indicators.cs index e482e21ec..030f31a2e 100644 --- a/tests/performance/Perf.Indicators.cs +++ b/tests/performance/Perf.Indicators.cs @@ -262,7 +262,7 @@ public object GetEmaStream() public object GetSmma() => h.GetSmma(10); [Benchmark] - public object GetStarcBands() => h.GetStarcBands(); + public object GetStarcBands() => h.GetStarcBands(10); [Benchmark] public object GetStc() => h.GetStc();