[CodeFactor] Apply fixes to commit 0606491

This commit is contained in:
codefactor-io
2026-03-12 19:37:50 +00:00
parent 060649192f
commit 8f79257155
384 changed files with 1197 additions and 1215 deletions
@@ -114,7 +114,7 @@ public sealed class CoppockIndicatorTests
var now = DateTime.UtcNow;
for (int i = 0; i < 25; i++)
{
indicator.HistoricalData.AddBar(now.AddMinutes(i), 100 + i * 0.5, 110 + i * 0.5, 90 + i * 0.5, 105 + i * 0.5);
indicator.HistoricalData.AddBar(now.AddMinutes(i), 100 + (i * 0.5), 110 + (i * 0.5), 90 + (i * 0.5), 105 + (i * 0.5));
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
}
@@ -149,7 +149,7 @@ public sealed class CoppockBarCorrectionTests
var c = new Coppock(longRoc: 3, shortRoc: 2, wmaPeriod: 3);
for (int i = 0; i < 5; i++)
{
c.Update(new TValue(DateTime.UtcNow, 100.0 + i * 2), isNew: true);
c.Update(new TValue(DateTime.UtcNow, 100.0 + (i * 2)), isNew: true);
}
double val1 = c.Last.Value;
c.Update(new TValue(DateTime.UtcNow, 115.0), isNew: true);
@@ -93,7 +93,7 @@ public sealed class CoppockValidationTests(ITestOutputHelper output)
double startPrice = 100.0;
int n = 60;
double[] prices = new double[n];
for (int i = 0; i < n; i++) { prices[i] = startPrice + i * 0.5; }
for (int i = 0; i < n; i++) { prices[i] = startPrice + (i * 0.5); }
var spanOut = new double[n];
Coppock.Batch(prices, spanOut, longRoc: 5, shortRoc: 4, wmaPeriod: 4);
@@ -114,7 +114,7 @@ public sealed class CoppockValidationTests(ITestOutputHelper output)
double startPrice = 200.0;
int n = 60;
double[] prices = new double[n];
for (int i = 0; i < n; i++) { prices[i] = startPrice - i * 0.5; }
for (int i = 0; i < n; i++) { prices[i] = startPrice - (i * 0.5); }
var spanOut = new double[n];
Coppock.Batch(prices, spanOut, longRoc: 5, shortRoc: 4, wmaPeriod: 4);