mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-19 02:58:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -364,7 +364,7 @@ public class DecoTests
|
||||
TValue last = default;
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
last = deco.Update(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + i * i * 0.1));
|
||||
last = deco.Update(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + (i * i * 0.1)));
|
||||
}
|
||||
Assert.NotEqual(0.0, last.Value);
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ public class DecoValidationTests
|
||||
for (int i = 0; i < 60; i++)
|
||||
{
|
||||
double phase = 2.0 * Math.PI * i / 20.0; // period=20 bars
|
||||
var rUp = decoUp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + 10.0 * Math.Sin(phase)));
|
||||
var rDown = decoDown.Update(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 - 10.0 * Math.Sin(phase)));
|
||||
var rUp = decoUp.Update(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 + (10.0 * Math.Sin(phase))));
|
||||
var rDown = decoDown.Update(new TValue(DateTime.UtcNow.AddSeconds(i), 100.0 - (10.0 * Math.Sin(phase))));
|
||||
lastUp = rUp.Value;
|
||||
lastDown = rDown.Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user