mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-21 03:58:04 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -64,7 +64,7 @@ public sealed class PivotfibIndicatorTests
|
||||
var now = DateTime.UtcNow;
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
double basePrice = 100 + i * 2;
|
||||
double basePrice = 100 + (i * 2);
|
||||
indicator.HistoricalData.AddBar(now.AddMinutes(i), basePrice, basePrice + 5, basePrice - 5, basePrice + 2);
|
||||
|
||||
var args = new UpdateArgs(UpdateReason.HistoricalBar);
|
||||
|
||||
@@ -36,10 +36,10 @@ public sealed class PivotfibValidationTests
|
||||
double range = pH - pL;
|
||||
|
||||
Assert.Equal(expectedPP, ind.PP, 10);
|
||||
Assert.Equal(expectedPP + 0.382 * range, ind.R1, 10);
|
||||
Assert.Equal(expectedPP - 0.382 * range, ind.S1, 10);
|
||||
Assert.Equal(expectedPP + 0.618 * range, ind.R2, 10);
|
||||
Assert.Equal(expectedPP - 0.618 * range, ind.S2, 10);
|
||||
Assert.Equal(expectedPP + (0.382 * range), ind.R1, 10);
|
||||
Assert.Equal(expectedPP - (0.382 * range), ind.S1, 10);
|
||||
Assert.Equal(expectedPP + (0.618 * range), ind.R2, 10);
|
||||
Assert.Equal(expectedPP - (0.618 * range), ind.S2, 10);
|
||||
Assert.Equal(expectedPP + range, ind.R3, 10);
|
||||
Assert.Equal(expectedPP - range, ind.S3, 10);
|
||||
}
|
||||
@@ -245,5 +245,4 @@ public sealed class PivotfibValidationTests
|
||||
Assert.Equal(ind.R3 - ind.PP, ind.PP - ind.S3, 10);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user