mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 04:28:04 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -68,7 +68,7 @@ public sealed class MstochIndicatorTests
|
||||
var now = DateTime.UtcNow;
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), 100 + i * 0.5, 110 + i * 0.5, 90 + i * 0.5, 105 + i * 0.5);
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), 100 + (i * 0.5), 110 + (i * 0.5), 90 + (i * 0.5), 105 + (i * 0.5));
|
||||
var args = new UpdateArgs(UpdateReason.HistoricalBar);
|
||||
indicator.ProcessUpdate(args);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public sealed class MstochIndicatorTests
|
||||
var now = DateTime.UtcNow;
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), 100 + i * 0.5, 110 + i * 0.5, 90 + i * 0.5, 105 + i * 0.5);
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), 100 + (i * 0.5), 110 + (i * 0.5), 90 + (i * 0.5), 105 + (i * 0.5));
|
||||
indicator.ProcessUpdate(new UpdateArgs(UpdateReason.HistoricalBar));
|
||||
}
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public sealed class MstochValidationTests
|
||||
// Feed 50 strongly rising bars
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
mstoch.Update(new TValue(t0.AddSeconds(100 + i), 100.0 + i * 2.0));
|
||||
mstoch.Update(new TValue(t0.AddSeconds(100 + i), 100.0 + (i * 2.0)));
|
||||
}
|
||||
double risingVal = mstoch.Last.Value;
|
||||
|
||||
@@ -190,7 +190,7 @@ public sealed class MstochValidationTests
|
||||
}
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
mstoch.Update(new TValue(t0.AddSeconds(100 + i), 100.0 - i * 2.0));
|
||||
mstoch.Update(new TValue(t0.AddSeconds(100 + i), 100.0 - (i * 2.0)));
|
||||
}
|
||||
double fallingVal = mstoch.Last.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user