perara-libs / ta-lib-rt

TA-Lib RT is a fork of TA-Lib that provides additional API for incremental calculation of indicators without reprocessing whole data.

Home Page:http://ta-lib.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TA-Lib RT

TA-Lib RT (Real Time) is a fork of TA-Lib that provides additional API for incremental calculation of indicators without reprocessing whole data. Binary compatibility with original code is possible but isn't provided in this release.

In a nutshell each indicator function ( for example: int TA_[MYINDICATOR](indexArguments, dataArguments, optArguments, outArguments); ) got 5 more additional functions. 3 main functions:

  • int TA_[MYINDICATOR]_StateInit(void** _state, optArguments); - allocates indicator-dependant object that contains a state of its last calculation.
  • int TA_[MYINDICATOR]_State(void* _state, dataArguments, outArguments); - calculates indicator based on state given. Note: dataArguments here aren't arrays but signle values. This function should be called in a loop for all data values.
  • int TA_[MYINDICATOR]_StateFree( void** _state ); - destroys state object and frees its previously allocated memory.

And 2 helper functions:

  • int TA_[MYINDICATOR]_StateSave( void* _state, FILE* _file ); - serialize state object to file.
  • int TA_[MYINDICATOR]_StateLoad( void** _state, FILE* _file ); - read state object from file.

There is also support of dynamic indicator functions resolution via TA_FuncInfo with help of TA_GetInitNewStateFuncPtr(), TA_GetCallFuncStateFuncPtr(), TA_GetFreeStateFuncPtr(), TA_GetSaveStateFuncPtr() and TA_GetLoadStateFuncPtr().

Please refer to wiki and examples for details.

Current version is alpha and only C++ API is tested

About

TA-Lib RT is a fork of TA-Lib that provides additional API for incremental calculation of indicators without reprocessing whole data.

http://ta-lib.org


Languages

Language:C 50.0%Language:Makefile 24.9%Language:Java 19.5%Language:C++ 4.2%Language:Perl 0.7%Language:QMake 0.3%Language:HTML 0.1%Language:CMake 0.1%Language:Python 0.1%Language:Raku 0.0%Language:M4 0.0%Language:Shell 0.0%Language:Batchfile 0.0%