diff --git a/ta_lib/core/src/smoothing.rs b/ta_lib/core/src/smoothing.rs index 0e0f7989..974e77f1 100644 --- a/ta_lib/core/src/smoothing.rs +++ b/ta_lib/core/src/smoothing.rs @@ -21,11 +21,7 @@ impl Series { for _ in 0..len { let prev = sum.shift(1); - sum = iff!( - prev.na(), - seed, - alpha * self + (1. - alpha) * nz!(prev, sum) - ) + sum = iff!(prev.na(), seed, alpha * self + (1. - alpha) * prev) } sum