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

[Bug report] True range not calculated correctly #34

Closed
WoutGeeurickx opened this issue Mar 14, 2020 · 4 comments
Closed

[Bug report] True range not calculated correctly #34

WoutGeeurickx opened this issue Mar 14, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@WoutGeeurickx
Copy link

WoutGeeurickx commented Mar 14, 2020

Hi Kevin,

While experimenting with the many indicators that you have implemented (big thanks for that!), I noticed a mistake in the calculation for the True Range.
I guess pandas_ta/volatility/true_range.py line 61 should be
ranges = [high - low, high - prev_close, prev_close - low]
instead of
ranges = [high - low, high - prev_close, low - prev_close]

Regards,
Wout

@twopirllc
Copy link
Owner

Hello Wout,

Excellent catch! Thanks for letting me know. I will try and get a fix in soon.

Thank you,
KJ

@twopirllc twopirllc self-assigned this Mar 16, 2020
@twopirllc twopirllc added the bug Something isn't working label Mar 16, 2020
@atefar2
Copy link

atefar2 commented Mar 17, 2020 via email

@twopirllc
Copy link
Owner

Hello @atefar2,

You need to be more descriptive then, import pandas_ta is acting up. If this not related to the true_range calculation issued above, please open a new issue with a better description and your environment.

Thanks

@twopirllc
Copy link
Owner

Hello @WoutGeeurickx

Bug has been fixed and updated on Github.

Thanks again,
Kevin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants