[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
@@ -305,7 +305,7 @@ public sealed class VwapsdValidationTests : IDisposable
// VWAP should be closer to 100 (high volume price)
// VWAP = (100 × 10000 + 200 × 100) / (10000 + 100) = 1020000 / 10100 ≈ 100.99
double expectedVwap = (100.0 * 10000 + 200.0 * 100) / (10000 + 100);
double expectedVwap = ((100.0 * 10000) + (200.0 * 100)) / (10000 + 100);
Assert.Equal(expectedVwap, vwapsd.Vwap.Value, precision: 10);
Assert.True(vwapsd.Vwap.Value < 110, "VWAP should be heavily weighted toward 100");
@@ -466,7 +466,7 @@ public sealed class VwapsdValidationTests : IDisposable
// Multiple zero-volume bars with different prices
for (int i = 0; i < 5; i++)
{
var zeroVolBar = new TBar(DateTime.UtcNow.AddMinutes(i + 1), 200 + i * 10, 200 + i * 10, 200 + i * 10, 200 + i * 10, 0);
var zeroVolBar = new TBar(DateTime.UtcNow.AddMinutes(i + 1), 200 + (i * 10), 200 + (i * 10), 200 + (i * 10), 200 + (i * 10), 0);
vwapsd.Update(zeroVolBar);
}