-
Notifications
You must be signed in to change notification settings - Fork 6
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
Squeeze Momentum Indicator wrong calculation #3
Comments
I checked my implementation and the values are indeed a little bit different than on TradingView, even though the "shape" looks correct, also the zero-line crossings seem to be correct. Yet I couldn't find a bug in my calculation, but indeed LazyBear's original implementation has a bug. It uses the multiplier for the Keltner Channel for the calculation of the Bollinger Bands. TradingView PineScript: Maybe this is the reason for the differences. |
Question: Did we open up a Ticket for LazyBear. :-) Hehehe, but how?! |
I think so, it would make sense. Afaik there is no issue reporting on TradingView, but there is a comment area below the indicator page. I just noticed that the bug is known. The indicator was released in July 2014, and the bug was discovered in September 2014. The description starts with:
I wonder why the source code in TradingView was not updated, but I assume that this was not possible 10 years ago. When I have time, I'll copy and paste the fixed code to a private indicator to compare the values. @Andre0711er You can also do this if you want. I'll keep this issue open until we clarified the situation. |
@Cypher01 Might be a good idea, to add a comment inside the code. including reference to that page. This will help for the next person who to code review or comparing tests between code and tradingview. Greets, André. |
Hi.
I just add the first unit test for Squeeze Momentum Indicator. I just compare calculated values with Tradingview data and they differ.
Following test data are used:
BTCUDST.P from Bybit
1 day interval
might be cool, to check. i don't see the problem yet.
here are the test:
https://github.com/Andre0711er/ta4j-extended/blob/main/src/test/java/org/ta4j/core/indicators/SqueezeMomentumIndicatorTest.java
I know, my changes, on code basis, based on ta4j 0.8-SNAPSHOT yet, but indicator itself aren't touched.
The text was updated successfully, but these errors were encountered: