mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-24 05:28:05 +00:00
[CodeFactor] Apply fixes to commit 0606491
This commit is contained in:
@@ -23,7 +23,7 @@ public class DemaTests
|
||||
|
||||
var e1Val = ema1.Update(tVal);
|
||||
var e2Val = ema2.Update(e1Val);
|
||||
double expected = 2 * e1Val.Value - e2Val.Value;
|
||||
double expected = (2 * e1Val.Value) - e2Val.Value;
|
||||
|
||||
Assert.Equal(expected, dVal.Value, 1e-9);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ public sealed class DemaValidationTests : IDisposable
|
||||
// Manual DEMA (Ooples logic)
|
||||
var e1 = ema1.Update(item);
|
||||
var e2 = ema2.Update(e1); // EMA of EMA
|
||||
double ooplesVal = 2 * e1.Value - e2.Value;
|
||||
double ooplesVal = (2 * e1.Value) - e2.Value;
|
||||
|
||||
// Compare
|
||||
// Note: There might be tiny differences due to floating point operations order
|
||||
|
||||
Reference in New Issue
Block a user