[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 PivotwoodIndicatorTests
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);
@@ -32,16 +32,16 @@ public sealed class PivotwoodValidationTests
double pL = bars[i - 1].Low;
double pC = bars[i - 1].Close;
double expectedPP = (pH + pL + 2.0 * pC) / 4.0;
double expectedPP = (pH + pL + (2.0 * pC)) / 4.0;
double range = pH - pL;
Assert.Equal(expectedPP, ind.PP, 10);
Assert.Equal(2.0 * expectedPP - pL, ind.R1, 10);
Assert.Equal(2.0 * expectedPP - pH, ind.S1, 10);
Assert.Equal((2.0 * expectedPP) - pL, ind.R1, 10);
Assert.Equal((2.0 * expectedPP) - pH, ind.S1, 10);
Assert.Equal(expectedPP + range, ind.R2, 10);
Assert.Equal(expectedPP - range, ind.S2, 10);
Assert.Equal(pH + 2.0 * (expectedPP - pL), ind.R3, 10);
Assert.Equal(pL - 2.0 * (pH - expectedPP), ind.S3, 10);
Assert.Equal(pH + (2.0 * (expectedPP - pL)), ind.R3, 10);
Assert.Equal(pL - (2.0 * (pH - expectedPP)), ind.S3, 10);
}
}
@@ -253,5 +253,4 @@ public sealed class PivotwoodValidationTests
}
}
}
}