sdcoffey / techan

Technical Analysis Library for Golang
https://godoc.org/github.com/sdcoffey/techan
MIT License
840 stars 143 forks source link

should EMA consider time window? #42

Closed SunRunAwayAwayAway closed 3 years ago

SunRunAwayAwayAway commented 3 years ago

Hi, I see the implementation of EMA does not consider the time window, is it correct? https://github.com/sdcoffey/techan/blob/572c478f546ecfef27a8454bd653f95829269490/indicator_exponential_moving_average.go#L24-L37

Also, is RSI correct since RSI relays on EMA?

d01phin commented 3 years ago

I think it's incorrect, window is not used anywhere in the calculation.

sdcoffey commented 3 years ago

Fixed as of 0.12.1! Shoutout to @danhenke and @joelnordell for the fix