-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Zigzag indicator implementation using numba will close issue #443 and complete pr #693 #761
Conversation
Great! Will check it out when I can. 😎 |
Check the tests, please. That's a very cool improvement. |
I reviewed the logs and it seems that the issues aren't stemming from my implementation. Can you confirm, @twopirllc ? |
@aligheshlaghi97 & @dmastapkovich Failed TestsThese fails occur after adding/removing indicators, so yes adding zigzag creates the following FAILED tests/test_studies.py::test_study_category_columns[trend-30] - assert ...
FAILED tests/test_studies.py::test_study_category_columns[all-323] - assert 3...
FAILED tests/test_studies.py::test_study_all_multirun_talib[False] - assert 6...
FAILED tests/test_studies.py::test_study_all_multirun_talib[True] - assert 62... I suppose some additional testing code can be added to determine column counts automatically to avoid *WarningsLastly, you can ignore the Warnings as most of them will be taken care of on the next development update. The only remaining Warning I have to figure out is: ../env11/lib/python3.11/site-packages/pandas_datareader/compat/__init__.py:11: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
PANDAS_VERSION = LooseVersion(pd.__version__) Supposedly it is still an open issue for pandas-datareader until a new release comes out. |
Thank you very much for the improved version. It looks promising and I'll play a around with it a bit more once I have a bit more time.
|
this is awesome. when will this be merged into the |
Hello @twopirllc
I'm pleased to present a new pull request for the completion of the zigzag indicator.
In this update, I've utilized Numba for implementation, as opposed to the previous approach which relied on Pandas. and compared the results with TradingView's default zigzag indicator and everything seems to be so much similar.
Below, you'll find the outcome of applying a deviation of 5% and a pivot leg of 10 to the BTCUSD daily chart:
Compare this with the result of the new implementation under the same configuration:
In order to test it yourself, use the following code:
Additionally, I believe this code snippet could prove beneficial for @AureliusMarcusHu and @KilianB in their Pandas-TA coding endeavors.