[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
@@ -155,7 +155,7 @@ public class AdxvmaIndicatorTests
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));
}
+1 -1
View File
@@ -493,7 +493,7 @@ public class AdxvmaTests
// Feed strong uptrend bars (large +DM consistently)
for (int i = 0; i < 50; i++)
{
double price = 100 + i * 2;
double price = 100 + (i * 2);
var bar = new TBar(time.AddMinutes(i), price, price + 1, price - 0.5, price + 0.5, 1000);
adxvma.Update(bar, isNew: true);
}
@@ -178,7 +178,7 @@ public class AdxvmaValidationTests
// Strong uptrend: each bar H > prev H, L > prev L, consistent +DM
for (int i = 0; i < 100; i++)
{
double basePrice = 100 + i * 1.5;
double basePrice = 100 + (i * 1.5);
var bar = new TBar(time.AddMinutes(i), basePrice, basePrice + 2, basePrice - 1, basePrice + 1, 1000);
adxvma.Update(bar, isNew: true);
}
@@ -208,7 +208,7 @@ public class AdxvmaValidationTests
// Feed choppy bars: alternating up/down moves cancel out → ADX stays low
for (int i = 50; i < 150; i++)
{
double price = 100 + Math.Sin(i * 0.5) * 2; // oscillating around 100
double price = 100 + (Math.Sin(i * 0.5) * 2); // oscillating around 100
var bar = new TBar(time.AddMinutes(i), price, price + 1, price - 1, price, 1000);
adxvma.Update(bar, isNew: true);
}