Skip to content
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 errors #300

Open
sanbikinosaru opened this issue Jun 23, 2022 · 1 comment
Open

MACD errors #300

sanbikinosaru opened this issue Jun 23, 2022 · 1 comment

Comments

@sanbikinosaru
Copy link

Version 0.10.1
ta.trend.MACD(df.close, window_slow = 26, window_fast = 12, window_sign = 9) is outputing <ta.trend.MACD object at 0x000001C2823C7280>

ta.trend.macd(df.close, window_slow = 26, window_fast = 12, window_sign = 9) is outputing TypeError: macd() got an unexpected keyword argument 'window_sign'

ta.trend.macd(df.close, window_slow = 26, window_fast = 12) output ok

@barsv
Copy link

barsv commented May 30, 2024

AFAIU, it's not a bug, because ta.trend.macd(df.close, window_slow = 26, window_fast = 12) is a shorthand for ta.trend.MACD(df.close, window_slow = 26, window_fast = 12, window_sign = 9).macd()

you don't need a signal line to calculate .macd() hence parameter window_sign is not needed for it. it's needed only for ta.trend.macd_signal(...) and ta.trend.macd_diff().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants