Skip to content

Commit

Permalink
obsolete notes updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Oct 27, 2024
1 parent 4204e31 commit ad9bda2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/_common/ObsoleteV3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static partial class Indicator
// GENERAL INDICATOR METHODS

[ExcludeFromCodeCoverage]
[Obsolete("Use alternate 'GetX' variant. Tuple arguments were removed.", false)] // v3.0.0
[Obsolete("Use alternate 'ToAlligator' variant. Tuple arguments were removed.", false)] // v3.0.0
public static IEnumerable<AlligatorResult> GetAlligator(
this IEnumerable<(DateTime d, double v)> priceTuples,
int jawPeriods = 13,
Expand All @@ -38,21 +38,21 @@ public static IEnumerable<EmaResult> GetEma<TQuote>(
// REMOVAL OF INTEGRATED SMAs (evaluates to ERRORs)

[ExcludeFromCodeCoverage]
[Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
[Obsolete("Use a chained `results.ToSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
public static IEnumerable<AdlResult> GetAdl<TQuote>(
this IReadOnlyList<TQuote> quotes, int smaPeriods)
where TQuote : IQuote
=> quotes.ToSortedList().ToAdl();

[ExcludeFromCodeCoverage]
[Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
[Obsolete("Use a chained `results.ToSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
public static IEnumerable<ObvResult> GetObv<TQuote>(
this IReadOnlyList<TQuote> quotes, int smaPeriods)
where TQuote : IQuote
=> quotes.ToObv();

[ExcludeFromCodeCoverage]
[Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
[Obsolete("Use a chained `results.ToSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
public static IEnumerable<PrsResult> GetPrs<TQuote>(
this IEnumerable<TQuote> quotesEval, IEnumerable<TQuote> quotesBase, int lookbackPeriods, int smaPeriods)
where TQuote : IQuote
Expand All @@ -64,21 +64,21 @@ public static IEnumerable<PrsResult> GetPrs<TQuote>(
.Use(CandlePart.Close), lookbackPeriods);

[ExcludeFromCodeCoverage]
[Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
[Obsolete("Use a chained `results.ToSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
public static IEnumerable<RocResult> GetRoc<TQuote>(
this IReadOnlyList<TQuote> quotes, int lookbackPeriods, int smaPeriods)
where TQuote : IQuote
=> quotes.Use(CandlePart.Close).ToRoc(lookbackPeriods);

[ExcludeFromCodeCoverage]
[Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
[Obsolete("Use a chained `results.ToSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
public static IEnumerable<StdDevResult> GetStdDev<TQuote>(
this IReadOnlyList<TQuote> quotes, int lookbackPeriods, int smaPeriods)
where TQuote : IQuote
=> quotes.Use(CandlePart.Close).ToStdDev(lookbackPeriods);

[ExcludeFromCodeCoverage]
[Obsolete("Use a chained `results.GetSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
[Obsolete("Use a chained `results.ToSma(smaPeriods)` to generate a moving average.", true)] // v3.0.0
public static IEnumerable<TrixResult> GetTrix<TQuote>(
this IReadOnlyList<TQuote> quotes, int lookbackPeriods, int smaPeriods)
where TQuote : IQuote
Expand Down
4 changes: 2 additions & 2 deletions src/_common/ObsoleteV3.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ See your compiler `Warning` to identify these in your code.
```csharp
// To refactor, here's an example replacement for ADL:
var results = quotes.GetAdl(10);
var adlSma = results.GetSma(5);
var results = quotes.ToAdl(10);
var adlSma = results.ToSma(5);

// ref: old usage example
Expand Down

0 comments on commit ad9bda2

Please sign in to comment.