Hello, I've spent the past few days trying to figure out if i'm making some mistake or if its an issue with ta-lib. ( I'm using the python talib wrapper)
My CMO inputs have been relatively accurate when close to 0 but the minimums and maximums have been significantly different.
I scaled the values up to deal with rounding errors and tried pulling 6,000 candles to deal with the unstable period.
If anyone could help me out it would be much appreciated.
here's my code and the CMO is plotted at the bottom,
https://gist.github.com/K-Kit/511107c4d617fb11d4330cfa2bb433e9
and here's a snapshot of the tradingview for roughly the same time period
The min and max of the last ~24 hours should have been +/- 80 but its outputting +/-46
edit: I've also tried normalizing the data, just tried reading over the C code and i don't see what could cause the issue although I'm not very experienced in C
It seems to definitely be more than CMO, I just tested CCI and am getting nonsensical values:
When I check the minimum value returned by CCI over the past day I'm getting -317.68921
however the lowest the CCI should be able to go is -100
It appears to me that it crosses the 0 line at all the same points, however the farther from 0 the more off it gets
I was able to get a much closer result using this
https://github.com/kylejusticemagnuson/pyti/blob/master/pyti/chande_momentum_oscillator.py
still no luck figuring out what's happening with the ta-lib CMO calc
heres a comparison of the 2 the bottom being the pyti version
(apologies for the poor labeling)
Tested against MFI and got very similar results but still slightly different but reasonable
(sorry for all the images if theres a cleaner way to format this i'm open to suggestions)