mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 13:38:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -57,7 +57,7 @@ public class JvoltynIndicatorTests
|
||||
var now = DateTime.UtcNow;
|
||||
for (int i = 0; i < 30; 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
|
||||
@@ -186,7 +186,7 @@ public class JvoltynIndicatorTests
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
// Create varying volatility patterns
|
||||
double basePrice = 100 + (i % 10) * 5 + (i % 2 == 0 ? 20 : -15);
|
||||
double basePrice = 100 + ((i % 10) * 5) + (i % 2 == 0 ? 20 : -15);
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), basePrice, basePrice + 10, basePrice - 10, basePrice + 3, 1000);
|
||||
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user