mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-23 13:08:04 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -134,7 +134,7 @@ public class LtmaTests
|
||||
// Multiple corrections
|
||||
for (int c = 0; c < 5; c++)
|
||||
{
|
||||
ltma.Update(new TValue(baseBar.Time, baseBar.Close + (c + 1) * 2.0), isNew: false);
|
||||
ltma.Update(new TValue(baseBar.Time, baseBar.Close + ((c + 1) * 2.0)), isNew: false);
|
||||
}
|
||||
|
||||
// Final correction with original → must restore
|
||||
|
||||
@@ -195,7 +195,7 @@ public sealed class LtmaValidationTests : IDisposable
|
||||
var ltmaVal = ltma.Update(tVal);
|
||||
var e1 = ema1.Update(tVal);
|
||||
var e2 = ema2.Update(e1);
|
||||
double expected = 2.0 * e1.Value - e2.Value;
|
||||
double expected = (2.0 * e1.Value) - e2.Value;
|
||||
|
||||
Assert.Equal(expected, ltmaVal.Value, 1e-9);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user