mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 11:08:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -34,7 +34,7 @@ public class ChopTests
|
||||
// Generate trending bars: each bar higher than the last
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
double basePrice = 100 + i * 2; // Strong uptrend
|
||||
double basePrice = 100 + (i * 2); // Strong uptrend
|
||||
bars.Add(new TBar(
|
||||
time: DateTime.UtcNow.AddMinutes(i),
|
||||
open: basePrice - 0.5,
|
||||
|
||||
@@ -74,7 +74,7 @@ public sealed class ChopValidationTests : IDisposable
|
||||
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
double price = 100.0 + i * 3.0; // Strong linear uptrend
|
||||
double price = 100.0 + (i * 3.0); // Strong linear uptrend
|
||||
var bar = new TBar(DateTime.UtcNow.AddMinutes(i), price, price + 0.5, price - 0.5, price, 1000);
|
||||
chop.Update(bar);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public sealed class ChopValidationTests : IDisposable
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
// Oscillating price with wide range but no trend
|
||||
double price = 100.0 + 5.0 * Math.Sin(2.0 * Math.PI * i / 3.0);
|
||||
double price = 100.0 + (5.0 * Math.Sin(2.0 * Math.PI * i / 3.0));
|
||||
double high = price + 3.0;
|
||||
double low = price - 3.0;
|
||||
var bar = new TBar(DateTime.UtcNow.AddMinutes(i), price, high, low, price, 1000);
|
||||
|
||||
Reference in New Issue
Block a user