Code Scanning fixes

This commit is contained in:
Miha Kralj
2024-10-05 15:41:25 -07:00
parent 3458b14ebb
commit b6ecf537cd
5 changed files with 15 additions and 20 deletions
+2 -3
View File
@@ -11,7 +11,6 @@ public class TradyTests
private readonly Random rnd;
private readonly double range;
private readonly int iterations;
private int period;
private readonly int skip;
private readonly IEnumerable<IOhlcv> Candles;
@@ -39,7 +38,7 @@ public class TradyTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Sma ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
@@ -69,7 +68,7 @@ public class TradyTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Ema ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
+2 -4
View File
@@ -8,7 +8,6 @@ public class TulipTests
private readonly GbmFeed feed;
private readonly Random rnd;
private readonly double range;
private int period;
private readonly int iterations;
private readonly double[] data;
private readonly double[] outdata;
@@ -32,7 +31,7 @@ public class TulipTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Sma ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
@@ -56,8 +55,7 @@ public class TulipTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
period = 20;
int period = rnd.Next(30) + 5;
Ema ma = new(period, useSma: false);
TSeries QL = new();
foreach (TBar item in feed)
+6 -7
View File
@@ -8,8 +8,7 @@ public class TAlibTests
private readonly GbmFeed feed;
private readonly Random rnd;
private readonly double range;
private int period;
private readonly int iterations;
private readonly int iterations;
private readonly double[] data;
private readonly double[] TALIB;
@@ -32,7 +31,7 @@ public class TAlibTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Sma ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
@@ -52,7 +51,7 @@ public class TAlibTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Ema ma = new(period, useSma: true);
TSeries QL = new();
foreach (TBar item in feed)
@@ -72,7 +71,7 @@ public class TAlibTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Dema ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
@@ -92,7 +91,7 @@ public class TAlibTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
Tema ma = new(period);
TSeries QL = new();
foreach (TBar item in feed)
@@ -135,7 +134,7 @@ public class TAlibTests
{
for (int run = 0; run < iterations; run++)
{
period = rnd.Next(50) + 5;
int period = rnd.Next(50) + 5;
T3 ma = new(period, vfactor: 0.7, useSma: false);
TSeries QL = new();
foreach (TBar item in feed)