mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-21 12:08:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -247,7 +247,7 @@ public class SsfdspIndicatorTests
|
||||
// Generate trending then ranging price pattern
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
double price = 100.0 + 10.0 * Math.Sin(i * 0.15);
|
||||
double price = 100.0 + (10.0 * Math.Sin(i * 0.15));
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), price, price + 1, price - 1, price);
|
||||
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
|
||||
values.Add(indicator.LinesSeries[0].GetValue(0));
|
||||
|
||||
@@ -103,7 +103,7 @@ public class SsfdspTests
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
double price = 100.0 + i * 1.0;
|
||||
double price = 100.0 + (i * 1.0);
|
||||
ssfdsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class SsfdspTests
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
double price = 200.0 - i * 1.0;
|
||||
double price = 200.0 - (i * 1.0);
|
||||
ssfdsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ public class SsfdspTests
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
source.Add(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + Math.Sin(i * 0.1) * 10));
|
||||
source.Add(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + (Math.Sin(i * 0.1) * 10)));
|
||||
}
|
||||
|
||||
// Both should have values
|
||||
|
||||
@@ -159,7 +159,7 @@ public class SsfdspValidationTests
|
||||
|
||||
for (int i = 0; i < 200; i++)
|
||||
{
|
||||
double price = 100 + 10 * Math.Sin(frequency * i);
|
||||
double price = 100 + (10 * Math.Sin(frequency * i));
|
||||
ssfdsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
|
||||
if (i >= 80) // After warmup
|
||||
{
|
||||
@@ -337,7 +337,7 @@ public class SsfdspValidationTests
|
||||
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
double price = 100 + 10 * Math.Sin(2 * Math.PI * i / 40);
|
||||
double price = 100 + (10 * Math.Sin(2 * Math.PI * i / 40));
|
||||
ssfdsp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), price));
|
||||
|
||||
if (i >= 100) // After warmup
|
||||
|
||||
Reference in New Issue
Block a user