mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 03:28:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -59,7 +59,7 @@ public class BbwIndicatorTests
|
||||
var now = DateTime.UtcNow;
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
double basePrice = 100 + i * 2 + (i % 2 == 0 ? 5 : -5); // Add some volatility
|
||||
double basePrice = 100 + (i * 2) + (i % 2 == 0 ? 5 : -5); // Add some volatility
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), basePrice, basePrice + 5, basePrice - 5, basePrice + 2, 1000);
|
||||
|
||||
// Process update for each bar to simulate history loading
|
||||
|
||||
@@ -379,7 +379,7 @@ public class BbwTests
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
bbw.Update(new TValue(DateTime.UtcNow, 100 + i * 0.1));
|
||||
bbw.Update(new TValue(DateTime.UtcNow, 100 + (i * 0.1)));
|
||||
}
|
||||
double lowVolatilityBbw = bbw.Last.Value;
|
||||
|
||||
@@ -387,7 +387,7 @@ public class BbwTests
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
bbw.Update(new TValue(DateTime.UtcNow, 100 + i * 10));
|
||||
bbw.Update(new TValue(DateTime.UtcNow, 100 + (i * 10)));
|
||||
}
|
||||
double highVolatilityBbw = bbw.Last.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user