[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
@@ -227,7 +227,7 @@ public class HlvIndicatorTests
// Same data for both
for (int i = 0; i < 30; i++)
{
double basePrice = 100 + i * 0.5;
double basePrice = 100 + (i * 0.5);
indicatorRaw.HistoricalData.AddBar(now.AddMinutes(i), basePrice, basePrice + 3, basePrice - 3, basePrice + 1, 1000);
indicatorRaw.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
@@ -37,7 +37,7 @@ public class HlvValidationTests
[InlineData(10, 0.9)] // 1 - 1/10 = 9/10
public void Hlv_RmaDecay_IsCorrect(int period, double expectedDecay)
{
double decay = 1.0 - 1.0 / period;
double decay = 1.0 - (1.0 / period);
Assert.Equal(expectedDecay, decay, 10);
}
@@ -92,7 +92,7 @@ public class HlvValidationTests
[InlineData(14, 100)] // Very late - correction should be minimal
public void Hlv_BiasCorrection_WorksCorrectly(int period, int count)
{
double decay = 1.0 - 1.0 / period;
double decay = 1.0 - (1.0 / period);
double e = Math.Pow(decay, count);
double correctionFactor = 1.0 / (1.0 - e);