-
Notifications
You must be signed in to change notification settings - Fork 31
Compatibility with TA Lib
Note: in this article we don't discuss APIs that were not available in original TA-Lib and specific to TA-Lib RT.
TA-Lib RT is a fork of original TA-Lib and contains some changes and bugfixes that in a few cases affect the TA functions results. In this article we'll try to list all of these changes. But first of all we shall discuss which TA-Lib version we compare with TA-Lib.
Most of the original TA-Lib users are working with TA-Lib version 0.4.0. This is a release available on official website's download page and version that is downloaded by default from sourceforge. Perhaps that's a latest release but there are changes that were made after it in the project sources. In Changelog.txt you may find that project was bumped to version 0.5 (Summer 2008)
and CMakeLists.txt contains version 0.6.0-dev
. So we can assume that v 0.6 was under development.
The TA-Lib RT is forked from original sources on sourceforge with help of GitHub Importer tool and thus it inherits all changes made in it since v. 0.4. Thus first of all we should list the significant changes between TA-Lib 0.4.0 and TA-Lib 0.6.0-development
- 0.6.0-dev is more sensitive to the small values.
TA-lib is using TA_IS_ZERO()
macro to compare floating point integers to zero. In 0.4.0 it assumes all integers which absolute value is smaller than 1e-8
to be zero. Since this commit the threshold was decreased to 1e-14
.
Dozen of technical indicators in TA-Lib are making decisions based on TA_IS_ZERO()
result. Thus you may face with discrepancies in results on TA-Lib 0.4.0 and TA-Lib 0.6.0 or TA-Lib RT for such indicators. For example, if your input data contains long enough periods where values almost not changes.
-
TA-Lib's results for
MACD
,MACDEXT
,MACDFIX
,STOCH
,STOCHF
andSTOCHRSI
in case ofoptInTimePeriod == 1
are incorrect.It's a known issue that is discussed but not fixed in original project. Related TA-Lib RT discussion is here.
-
Allow minimal
optInTimePeriod = 1
(was 2) forSMA
,EMA
,WMA
,DEMA
,TEMA
,TRIMA
,KAMA
andT3
.This change is a result of discussion of the problem above.
-
CCI
indicator produces wrong values in case input data contain periods of equal constants That was fixed in TA-Lib RT. The problem was caused by direct floating point comparison to zero instead ofTA_IS_ZERO()
macro usage.Related discussion is here