[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
@@ -127,7 +127,7 @@ public sealed class KstIndicatorTests
var now = DateTime.UtcNow;
for (int i = 0; i < 20; 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));
}
+1 -1
View File
@@ -148,7 +148,7 @@ public sealed class KstBarCorrectionTests
var kst = new Kst(r1: 3, r2: 4, r3: 5, r4: 6, s1: 2, s2: 2, s3: 2, s4: 2, sigPeriod: 2);
for (int i = 0; i < 5; i++)
{
kst.Update(new TValue(DateTime.UtcNow, 100.0 + i * 2), isNew: true);
kst.Update(new TValue(DateTime.UtcNow, 100.0 + (i * 2)), isNew: true);
}
double val1 = kst.Last.Value;
kst.Update(new TValue(DateTime.UtcNow, 110.0), isNew: true);
@@ -101,7 +101,7 @@ public sealed class KstValidationTests(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; } // constant rise
for (int i = 0; i < n; i++) { prices[i] = startPrice + (i * 0.5); } // constant rise
var spanK = new double[n];
var spanS = new double[n];
@@ -124,7 +124,7 @@ public sealed class KstValidationTests(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; } // constant fall
for (int i = 0; i < n; i++) { prices[i] = startPrice - (i * 0.5); } // constant fall
var spanK = new double[n];
var spanS = new double[n];