[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
@@ -64,7 +64,7 @@ public sealed class PivotdemIndicatorTests
var now = DateTime.UtcNow;
for (int i = 0; i < 10; i++)
{
double basePrice = 100 + i * 2;
double basePrice = 100 + (i * 2);
indicator.HistoricalData.AddBar(now.AddMinutes(i), basePrice, basePrice + 5, basePrice - 5, basePrice + 2);
var args = new UpdateArgs(UpdateReason.HistoricalBar);
@@ -36,9 +36,9 @@ public sealed class PivotdemValidationTests
double pC = bars[i - 1].Close;
double x;
if (pC < pO) { x = pH + 2.0 * pL + pC; }
else if (pC > pO) { x = 2.0 * pH + pL + pC; }
else { x = pH + pL + 2.0 * pC; }
if (pC < pO) { x = pH + (2.0 * pL) + pC; }
else if (pC > pO) { x = (2.0 * pH) + pL + pC; }
else { x = pH + pL + (2.0 * pC); }
double expectedPP = x * 0.25;
Assert.Equal(expectedPP, p.PP, precision: 10);
@@ -64,9 +64,9 @@ public sealed class PivotdemValidationTests
double pC = bars[i - 1].Close;
double x;
if (pC < pO) { x = pH + 2.0 * pL + pC; }
else if (pC > pO) { x = 2.0 * pH + pL + pC; }
else { x = pH + pL + 2.0 * pC; }
if (pC < pO) { x = pH + (2.0 * pL) + pC; }
else if (pC > pO) { x = (2.0 * pH) + pL + pC; }
else { x = pH + pL + (2.0 * pC); }
double halfX = x * 0.5;
Assert.Equal(x * 0.25, p.PP, precision: 10);
@@ -239,5 +239,4 @@ public sealed class PivotdemValidationTests
}
}
}
}