GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TA-Lib/ta-lib: Technical analysis library: indicators and candlestick patterns, batch and streaming, native in C, Rust, Java, C#... and more

BranchesTags
Open more actions menu

Latest commit

 

History

5,140 Commits
5,140 Commits

Folders and files

NameName
Last commit message
Last commit date
.claude/skills
.claude/skills
 
 
.devin
.devin
 
 
.github
.github
 
 
.vscode
.vscode
 
 
bin
bin
 
 
cmake
cmake
 
 
dist/digests
dist/digests
 
 
docs
docs
 
 
include
include
 
 
lib
lib
 
 
m4
m4
 
 
scripts
scripts
 
 
src
src
 
 
ta_codegen
ta_codegen
 
 
ta_ref
ta_ref
 
 
website
website
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
ABI.manifest
ABI.manifest
 
 
ABI.released
ABI.released
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CITATION.cff
CITATION.cff
 
 
CLAUDE.md
CLAUDE.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
Makefile.am
Makefile.am
 
 
README-DEVS.md
README-DEVS.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
VERSION
VERSION
 
 
autogen.sh
autogen.sh
 
 
conanfile.py
conanfile.py
 
 
configure.ac
configure.ac
 
 
context7.json
context7.json
 
 
global.json
global.json
 
 
rust-toolchain.toml
rust-toolchain.toml
 
 
ta-lib.dpkg.in
ta-lib.dpkg.in
 
 
ta-lib.pc.in
ta-lib.pc.in
 
 
ta-lib.spec.in
ta-lib.spec.in
 
 
ta_func_api.xml
ta_func_api.xml
 
 
ta_func_list.txt
ta_func_list.txt
 
 

Repository files navigation

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.

release license main nightly tests dev nightly tests Discord chat

Features

200+ indicators
ADX, MACD, RSI, Stochastic, Bollinger Bands and more, plus candlestick pattern recognition. See the complete list.

Batch and streaming
Compute a whole array, or update one bar at a time without recomputing the history. Streaming API.

Native in four languages
C/C++, Java, C# and Rust. Wrappers for Python, R, and more.

Made for integration
Glue-code friendly. Function metadata drives your UI, parameter range, automation and generated bindings. Abstract API.

  • 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 );

API · Streaming

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

API · Streaming

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

API · Streaming

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

API · Streaming

Install

Language
C/C++ brew install ta-lib, vcpkg install talib, or installers and packages
Java Maven Central
C# NuGet
Rust crates.io
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.

TA-Lib/ta-lib GitHub star history

About

Technical analysis library: indicators and candlestick patterns, batch and streaming, native in C, Rust, Java, C#... and more

ta-lib.org/

Topics

algorithmic-tradingbacktestingccandlestick-patternscppcsharpfinancialindicatorsjavaquantreal-timerustseries-analysisstreamingta-libtechnical-analysis

Resources

Readme
BSD-3-Clause license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

1.7k stars

Watchers

28 watching

Forks

299 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.