mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-20 03:28:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -83,7 +83,7 @@ public class AmatTests
|
||||
// Feed rising prices to create bullish trend
|
||||
for (int i = 0; i < 20; i++)
|
||||
{
|
||||
amat.Update(new TValue(DateTime.UtcNow, 100 + i * 2));
|
||||
amat.Update(new TValue(DateTime.UtcNow, 100 + (i * 2)));
|
||||
}
|
||||
|
||||
// Trend should be +1, -1, or 0
|
||||
@@ -99,7 +99,7 @@ public class AmatTests
|
||||
// Feed steadily rising prices
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
amat.Update(new TValue(DateTime.UtcNow, 100 + i * 3));
|
||||
amat.Update(new TValue(DateTime.UtcNow, 100 + (i * 3)));
|
||||
}
|
||||
|
||||
// Should be bullish when fast EMA > slow EMA and both rising
|
||||
@@ -121,7 +121,7 @@ public class AmatTests
|
||||
// Feed steadily falling prices
|
||||
for (int i = 0; i < 50; i++)
|
||||
{
|
||||
amat.Update(new TValue(DateTime.UtcNow, 200 - i * 3));
|
||||
amat.Update(new TValue(DateTime.UtcNow, 200 - (i * 3)));
|
||||
}
|
||||
|
||||
// Should be bearish when fast EMA < slow EMA and both falling
|
||||
@@ -471,7 +471,7 @@ public class AmatTests
|
||||
// Feed rising prices to create divergence
|
||||
for (int i = 0; i < 30; i++)
|
||||
{
|
||||
amat.Update(new TValue(DateTime.UtcNow, 100 + i * 5));
|
||||
amat.Update(new TValue(DateTime.UtcNow, 100 + (i * 5)));
|
||||
}
|
||||
|
||||
// Strength should be positive when there's divergence
|
||||
|
||||
@@ -273,7 +273,7 @@ public sealed class AmatValidationTests : IDisposable
|
||||
// Phase 2: Falling prices (reversal)
|
||||
for (int i = 50; i < 150; i++)
|
||||
{
|
||||
double price = 150 - (i - 50) * 2; // Fall faster than rise
|
||||
double price = 150 - ((i - 50) * 2); // Fall faster than rise
|
||||
amat.Update(new TValue(time.AddMinutes(i), price));
|
||||
}
|
||||
double bearishTrend = amat.Last.Value;
|
||||
|
||||
Reference in New Issue
Block a user