Skip to content

Commit

Permalink
Fixed calcualtion.
Browse files Browse the repository at this point in the history
  • Loading branch information
cinar committed Dec 23, 2024
1 parent 4a12b19 commit 44ca582
Show file tree
Hide file tree
Showing 2 changed files with 245 additions and 245 deletions.
2 changes: 1 addition & 1 deletion trend/smma.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (s *Smma[T]) Compute(c <-chan T) <-chan T {
result <- before

for n := range c {
before = ((before*T(s.Period) - 1) + n) / T(s.Period)
before = ((before * (T(s.Period) - 1)) + n) / T(s.Period)
result <- before
}
}()
Expand Down
Loading

0 comments on commit 44ca582

Please sign in to comment.