ta-lib-python icon indicating copy to clipboard operation
ta-lib-python copied to clipboard

RSI or CMO, one of them seems to be not working

Open SeongjinNam opened this issue 4 years ago • 3 comments

When I plot RSI, it produces the same chart as CMO does, with only difference of y axis value. The two graphs are exactly the same. I guess one of the two methods is not working as intended.

SeongjinNam avatar Feb 01 '21 08:02 SeongjinNam

The issue originate from code in TALIB:

RSI https://github.com/TA-Lib/ta-lib/blob/master/src/ta_func/ta_RSI.c

CMO https://github.com/TA-Lib/ta-lib/blob/master/src/ta_func/ta_CMO.c

From my perspective, when computing the CMO "ups" (refer to the formula in this page: https://www.fmlabs.com/reference/default.htm?url=CMO.htm), TALIB apply the same computation, which means, CMO is wrong.

i.e. RSI computes an EM Average with factor = 1/N; And CMO computes an EM Sum.

This inconsistence is caused by original TALIB, not the ta-lib python.

sun-te avatar Aug 30 '21 16:08 sun-te

any luck on fixing or replacing CMO?

Elyasnz avatar May 23 '23 10:05 Elyasnz

for anyone coming across this issue
take a look at this comment https://github.com/TA-Lib/ta-lib-python/issues/207#issuecomment-1559006949

Elyasnz avatar May 23 '23 10:05 Elyasnz