-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MACD Signal line (EMA) seems to be broken/not working... #39
Comments
@amlwwalker |
@sdcoffey - was trying to add a bug label to this, as for the v1 milestone be good to know if this is a EMA bug here? |
@amlwwalker I'll check this out! Will you let me know what version of the library you're using? Also if you can drop in your test data that would be super helpful as I debug. Thanks! |
hey, apologies @sdcoffey I actually now think it was an issue with scaling in Excel - i re plotted the graph in react-vis and it seemed to be good. I wonder if excel was getting caught by not quite adjusting the y scale correctly or something. I am however having divide by 0 crashes uses the trend_line:
Im using AAPL stock data (last ~thousand points) that I downloaded the CSV for from yahoo. I get:
My guess is for a few days there isn't a value, but I didn't think that would cause a run time error. I was wondering if it needs something on line 32 of indicator_trend.go:
versions:
While here, I was wondering if there was any seasonality/ARIMA/Prophet esq work, in the works, of if not do you know of any good library and I might try and implement it myself....? |
Hey @amlwwalker, good to know. I'll check out the divide by zero error. I definitely do not have any forecasting plans in the works, I think it might be out of scope for this project. I don't know of any library in go that does forecasting/seasonality, although you might look in awesome-go. |
Based on a series of data, to plot the MACD and signal lines, I am doing:
Where the above two functions are defined as:
However when I plot this, I get two very different lines
To check I wasn't going completely mad, I changed the signal line to use an SMA instead, so my MACDSignalLine function becomes
which plots like
Which suggests that the EMA isn't working correctly for some reason here. Any suggestions as to where Im going wrong would be great, thanks!
The text was updated successfully, but these errors were encountered: