[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
+1 -1
View File
@@ -326,7 +326,7 @@ public class DspIndicatorTests
// Generate sine wave price pattern
for (int i = 0; i < 100; i++)
{
double price = 100.0 + 10.0 * Math.Sin(i * 0.1);
double price = 100.0 + (10.0 * Math.Sin(i * 0.1));
indicator.HistoricalData.AddBar(now.AddMinutes(i), price, price + 1, price - 1, price);
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
values.Add(indicator.LinesSeries[0].GetValue(0));
+3 -3
View File
@@ -103,7 +103,7 @@ public class DspTests
for (int i = 0; i < 100; i++)
{
double price = 100.0 + i * 1.0;
double price = 100.0 + (i * 1.0);
dsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
}
@@ -118,7 +118,7 @@ public class DspTests
for (int i = 0; i < 100; i++)
{
double price = 200.0 - i * 1.0;
double price = 200.0 - (i * 1.0);
dsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
}
@@ -414,7 +414,7 @@ public class DspTests
for (int i = 0; i < 100; i++)
{
source.Add(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + Math.Sin(i * 0.1) * 10));
source.Add(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + (Math.Sin(i * 0.1) * 10)));
}
// Both should have values
+4 -4
View File
@@ -69,7 +69,7 @@ public class DspValidationTests
// Generate sine wave to simulate price oscillation
for (int i = 0; i < 200; i++)
{
double price = 100.0 + 10.0 * Math.Sin(i * 0.1);
double price = 100.0 + (10.0 * Math.Sin(i * 0.1));
dsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
if (dsp.IsHot)
{
@@ -310,7 +310,7 @@ public class DspValidationTests
for (int i = 0; i < 100; i++)
{
double price = 0.0001 + i * 0.00001;
double price = 0.0001 + (i * 0.00001);
dsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
}
@@ -325,7 +325,7 @@ public class DspValidationTests
for (int i = 0; i < 100; i++)
{
double price = 1e10 + i * 1e8;
double price = 1e10 + (i * 1e8);
dsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
}
@@ -363,7 +363,7 @@ public class DspValidationTests
// Strong uptrend with some noise
for (int i = 0; i < 300; i++)
{
double trend = 100.0 + i * 0.5;
double trend = 100.0 + (i * 0.5);
double noise = Math.Sin(i * 0.3) * 2.0;
double price = trend + noise;
dsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));