Skip to content

Commit

Permalink
fix: merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveSkender committed Jan 28, 2024
1 parent 43564ac commit 99722f3
Show file tree
Hide file tree
Showing 3 changed files with 765 additions and 93 deletions.
87 changes: 0 additions & 87 deletions tests/indicators/_common/Helper.LiveQuotes.cs

This file was deleted.

17 changes: 11 additions & 6 deletions tests/indicators/s-z/WilliamsR/WilliamsR.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,32 @@ public void Boundary()
}

[TestMethod]
public async Task Issue1127()
public void Issue1127()
{
// initialize
IEnumerable<Quote> quotes = await FeedData
.GetQuotes("A", 365 * 3)
.ConfigureAwait(false);
IOrderedEnumerable<Quote> test1127 = File.ReadAllLines("s-z/WilliamsR/issue1127quotes.csv")
.Skip(1)
.Select(Importer.QuoteFromCsv)
.OrderByDescending(x => x.Date);

List<Quote> quotesList = quotes.ToList();
List<Quote> quotesList = test1127.ToList();
int length = quotesList.Count;

// get indicators
List<WilliamsResult> resultsList = quotes
List<WilliamsResult> resultsList = test1127
.GetWilliamsR(14)
.ToList();

Console.WriteLine($"%R from {length} quotes.");

// analyze boundary
for (int i = 0; i < length; i++)
{
Quote q = quotesList[i];
WilliamsResult r = resultsList[i];

Console.WriteLine($"{q.Date:s} {r.WilliamsR}");

if (r.WilliamsR is not null)
{
Assert.IsTrue(r.WilliamsR <= 0);
Expand Down
Loading

0 comments on commit 99722f3

Please sign in to comment.