- C 72.1%
- Rust 22%
- Python 2.7%
- C# 1.4%
- Java 1.4%
- Other 0.2%
The tolerance rule named E and W before rZ1 defined them and spoke of an internal threshold a caller never compares against. The page now says how a level discards bars and sizes a proof count, that the caller's tolerance is the level's digits, and which outputs carry the proof's bound and which reach the digits by measurement. |
||
|---|---|---|
| .claude/skills | ||
| .github | ||
| .vscode | ||
| bin | ||
| cmake | ||
| dist/digests | ||
| docs | ||
| include | ||
| lib | ||
| m4 | ||
| scripts | ||
| src | ||
| ta_codegen | ||
| ta_ref | ||
| website | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| ABI.manifest | ||
| ABI.released | ||
| AGENTS.md | ||
| autogen.sh | ||
| CHANGELOG.md | ||
| CITATION.cff | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| conanfile.py | ||
| configure.ac | ||
| CONTRIBUTING.md | ||
| global.json | ||
| LICENSE | ||
| Makefile.am | ||
| README-DEVS.md | ||
| README.md | ||
| rust-toolchain.toml | ||
| SECURITY.md | ||
| ta-lib.dpkg.in | ||
| ta-lib.pc.in | ||
| ta-lib.spec.in | ||
| ta_func_api.xml | ||
| ta_func_list.txt | ||
| VERSION | ||
TA-Lib
TA-Lib implements the standard technical analysis algorithms used across the industry since 2001, and is often the reference other libraries test their results against.
Features
|
200+ indicators |
Batch and streaming |
|
Native in four languages |
Made for integration |
- No third-party dependencies.
- All native implementations are generated from one source and tested against the C reference.
Example
A 30-bar simple moving average, over an array and then on a live feed.
C/C++
#include <ta_libc.h>
TA_Initialize();
/* Batch: out[0] is the value at bar outBegIdx. */
int outBegIdx, outNBElement;
TA_SMA( 0, n - 1, close, 30, &outBegIdx, &outNBElement, out );
/* Streaming: open on history, then one call per bar. */
TA_SMA_Stream *s;
double sma;
TA_SMA_Open( &s, close, n, 30, &sma );
TA_SMA_Update( s, newClose, &sma ); /* a bar closed */
TA_SMA_Peek( s, formingClose, &sma ); /* bar still forming; state unchanged */
TA_SMA_Close( s );
Rust
use ta_lib::Core;
let core = Core::new();
// Batch: out[0] is the value at bar range.beg_idx.
let mut out = vec![0.0; close.len()];
let range = core.sma(0, close.len() - 1, &close, 30, &mut out)?;
// Streaming: open on history, then one call per bar.
let (mut s, last) = core.sma_open(&close, 30)?;
let v = s.update(new_close)?; // a bar closed
let p = s.peek(forming_close)?; // bar still forming; state unchanged
Java
import io.github.talib.Core;
import io.github.talib.OutRange;
Core core = Core.DEFAULT;
// Batch: out[0] is the value at bar r.begIdx().
double[] out = new double[close.length];
OutRange r = core.sma(0, close.length - 1, close, 30, out);
// Streaming: open on history, then one call per bar.
Core.SmaStream s = core.smaOpen(close, 30);
double v = s.update(newClose); // a bar closed
double p = s.peek(formingClose); // bar still forming; state unchanged
C#
using TALib;
var core = Core.Default;
// Batch: outReal[0] is the value at bar r.BegIdx.
var outReal = new double[close.Length];
OutRange r = core.Sma(0, close.Length - 1, close, 30, outReal);
// Streaming: open on history, then one call per bar.
Core.SmaStream s = core.SmaOpen(close, 30);
double v = s.Update(newClose); // a bar closed
double p = s.Peek(formingClose); // bar still forming; state unchanged
Install
| Language | |
|---|---|
| C/C++ | brew install ta-lib, vcpkg install talib, or installers and packages |
| Java | Maven Central |
| C# | Instructions |
| Rust | Instructions |
| Python | pip install TA-Lib (ta-lib-python, a wrapper of this library) |
| Others | R, Go, Ruby, PHP and more |
Links
- Website and docs: https://ta-lib.org
- Function list: https://ta-lib.org/functions/
- Request a function: New TA Functions board
- Contribute: CONTRIBUTING.md
- Report a vulnerability: SECURITY.md
License
BSD 3-Clause: free for open-source and commercial use. See LICENSE.
Star Count
Give a ⭐: backtests show a 100% correlation with maintainer happiness.