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

Not getting expected CCI values #103

Closed
MehdiAnis opened this issue Jan 6, 2020 · 3 comments
Closed

Not getting expected CCI values #103

MehdiAnis opened this issue Jan 6, 2020 · 3 comments

Comments

@MehdiAnis
Copy link

I used 200 made up data points to test CCI. My Data
High Low Close
1 1 1
2 1 1
3 1 1
4 1 1


200 1 1

in my excel calculation CCI values comes for each row = 66.66666667
Using candles.Cci(Period); gives me CCI = 123.80952380952380952380952381

I am attaching my excel file that I used for CCI calculation. Not sure why I am getting different result than the Trady CCI, any help appreciated. Thanks.

Trady_CCI_Check.xlsx

@karlwancl
Copy link
Owner

@MehdiAnis the fix is deployed to nuget, please update the package accordingly

@MehdiAnis
Copy link
Author

MehdiAnis commented Jan 7, 2020

I think I interpreted the CCI Calculation Formula differently, thus my numbers are different. But I am not 100% sure which interpretation to take. I will dig in. But thanks for the Update, I will use it.

@karlwancl
Copy link
Owner

@MehdiAnis Yes, I find that our interpretation are different. My version is getting the deviation using Abs(n-th TP - 14-th TP SMA) while yours is Abs(n-th TP - n-th TP SMA), I believe your version is a more accurate one, so I changed it. Most of the time, I find that there're some variations of formula for technical indicators, and I have to cross check the logic with different formula provide e.g. Wiki, Stockcharts, investopedia, etc. Anyway, I will end this issue. Thanks for your support on this library :)

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