[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
@@ -177,7 +177,7 @@ public class VamaIndicatorTests
// Start with low volatility period
for (int i = 0; i < 30; i++)
{
double price = 100 + i * 0.1;
double price = 100 + (i * 0.1);
indicator.HistoricalData.AddBar(now, price, price + 1, price - 1, price);
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
now = now.AddMinutes(1);
@@ -238,7 +238,7 @@ public class VamaIndicatorTests
var now = DateTime.UtcNow;
for (int i = 0; i < 200; i++)
{
double price = 100 + (i * 0.1) + Math.Sin(i * 0.1) * 2;
double price = 100 + (i * 0.1) + (Math.Sin(i * 0.1) * 2);
indicator.HistoricalData.AddBar(now.AddMinutes(i), price, price + 2, price - 2, price);
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
}
@@ -124,14 +124,14 @@ public class VamaValidationTests
// Feed low volatility bars first
for (int i = 0; i < 100; i++)
{
var bar = new TBar(time.AddMinutes(i), 100 + i * 0.1, 100.5 + i * 0.1, 99.5 + i * 0.1, 100 + i * 0.1, 1000);
var bar = new TBar(time.AddMinutes(i), 100 + (i * 0.1), 100.5 + (i * 0.1), 99.5 + (i * 0.1), 100 + (i * 0.1), 1000);
vamaLowVol.Update(bar, isNew: true);
}
// Feed high volatility bars
for (int i = 0; i < 100; i++)
{
var bar = new TBar(time.AddMinutes(i), 100 + i * 0.1, 110 + i * 0.1, 90 + i * 0.1, 100 + i * 0.1, 1000);
var bar = new TBar(time.AddMinutes(i), 100 + (i * 0.1), 110 + (i * 0.1), 90 + (i * 0.1), 100 + (i * 0.1), 1000);
vamaHighVol.Update(bar, isNew: true);
}