[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
+2 -2
View File
@@ -74,7 +74,7 @@ public class PvdIndicatorTests
var now = DateTime.UtcNow;
for (int i = 0; i < 30; i++)
{
double close = 100 + i * 0.5;
double close = 100 + (i * 0.5);
double volume = 100000 + (i % 3 == 0 ? 20000 : -10000);
indicator.HistoricalData.AddBar(now.AddMinutes(i), close - 1, close + 1, close - 2, close, volume);
@@ -213,7 +213,7 @@ public class PvdIndicatorTests
for (int i = 0; i < 20; i++)
{
double close = 100 + i;
indicator.HistoricalData.AddBar(now.AddMinutes(i), close - 1, close + 2, close - 2, close, 100000 + i * 1000);
indicator.HistoricalData.AddBar(now.AddMinutes(i), close - 1, close + 2, close - 2, close, 100000 + (i * 1000));
indicator.ProcessUpdate(new UpdateArgs(i == 0 ? UpdateReason.HistoricalBar : UpdateReason.NewBar));
}
+5 -5
View File
@@ -285,7 +285,7 @@ public class PvdTests
// Build up state
for (int i = 0; i < 10; i++)
{
pvd.Update(new TBar(time.AddMinutes(i), 100.0 + i, 100.0 + i, 100.0 + i, 100.0 + i, 1000.0 + i * 10), isNew: true);
pvd.Update(new TBar(time.AddMinutes(i), 100.0 + i, 100.0 + i, 100.0 + i, 100.0 + i, 1000.0 + (i * 10)), isNew: true);
}
_ = pvd.Last.Value;
@@ -307,7 +307,7 @@ public class PvdTests
// Build up state
for (int i = 0; i < 10; i++)
{
pvd.Update(new TBar(time.AddMinutes(i), 100.0 + i, 100.0 + i, 100.0 + i, 100.0 + i, 1000.0 + i * 10), isNew: true);
pvd.Update(new TBar(time.AddMinutes(i), 100.0 + i, 100.0 + i, 100.0 + i, 100.0 + i, 1000.0 + (i * 10)), isNew: true);
}
// Update with Infinity
@@ -325,7 +325,7 @@ public class PvdTests
// Build up state
for (int i = 0; i < 10; i++)
{
pvd.Update(new TBar(time.AddMinutes(i), 100.0 + i, 100.0 + i, 100.0 + i, 100.0 + i, 1000.0 + i * 10), isNew: true);
pvd.Update(new TBar(time.AddMinutes(i), 100.0 + i, 100.0 + i, 100.0 + i, 100.0 + i, 1000.0 + (i * 10)), isNew: true);
}
// Update with negative infinity
@@ -470,8 +470,8 @@ public class PvdTests
for (int i = 0; i < size; i++)
{
closes[i] = 100.0 + i * 0.01;
volumes[i] = 1000000.0 + i * 100;
closes[i] = 100.0 + (i * 0.01);
volumes[i] = 1000000.0 + (i * 100);
}
// Should not stack overflow
+1 -1
View File
@@ -264,7 +264,7 @@ public class PvdValidationTests
// Mix of zero and non-zero volumes
for (int i = 0; i < 20; i++)
{
double volume = i % 3 == 0 ? 0.0 : 1000.0 + i * 10;
double volume = i % 3 == 0 ? 0.0 : 1000.0 + (i * 10);
bars.Add(new TBar(time.AddMinutes(i), 100.0 + i, 101.0 + i, 99.0 + i, 100.5 + i, volume));
}