TA-Lib 0.8.3

dotnet add package TA-Lib --version 0.8.3
                    
NuGet\Install-Package TA-Lib -Version 0.8.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TA-Lib" Version="0.8.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TA-Lib" Version="0.8.3" />
                    
Directory.Packages.props
<PackageReference Include="TA-Lib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TA-Lib --version 0.8.3
                    
#r "nuget: TA-Lib, 0.8.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TA-Lib@0.8.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TA-Lib&version=0.8.3
                    
Install as a Cake Addin
#tool nuget:?package=TA-Lib&version=0.8.3
                    
Install as a Cake Tool

TA-Lib for .NET

TA-Lib, the widely used technical-analysis library, as a pure managed .NET library: 200+ indicators covering moving averages, momentum oscillators (RSI, MACD, Stochastic), volatility (Bollinger Bands, ATR), volume, Hilbert Transform cycle analysis, statistics, price transforms and candlestick patterns.

Every function is generated from the same canonical definitions as the C library and is bit-identical to the C reference implementation over the same inputs, except where a calculation calls a transcendental math function such as exp or log: .NET's math library can round that result differently from the C library in the last bit, which is beyond TA-Lib's control, and the difference can grow through the rest of the calculation. No native binaries, no P/Invoke, no dependencies.

Install

dotnet add package TA-Lib

The package is TA-Lib; the namespace is TALib. It targets net10.0.

Quick start

using TALib;

var core = Core.Default;

double[] close = [ /* ...your closing prices... */ ];
var outReal = new double[close.Length];

OutRange r = core.Sma(0, close.Length - 1, close, 30, outReal);

// outReal[0 .. r.Count - 1] holds the SMA; outReal[i] is input bar r.BegIdx + i.
for (int i = 0; i < r.Count; i++)
    Console.WriteLine($"bar {r.BegIdx + i} = {outReal[i]}");

Every indicator is a method on Core with the same calling pattern: a startIdx/endIdx range, input spans, parameters, caller-provided output spans, and an OutRange saying where the values start and how many there are. A range that ends inside the lookback is a success with no values, not an error. Invalid arguments throw.

Configuration

Core is immutable. The value-affecting settings, the unstable period and the candlestick thresholds, are chosen up front and then frozen, so one Core can be shared across threads:

Core tuned = Core.Builder()
    .UnstablePeriod(FuncUnstId.EMA, 10)
    .Build();

Live data

For a feed that arrives one bar at a time, each indicator also has a streaming form: open it on the history you already have, then each closed bar in gives that bar's value out, bit-identical to the batch call.

Core.SmaStream s = core.SmaOpen(close, 30);

double v = s.Update(newClose);            // a closed bar: commits it
double provisional = s.Peek(formingClose); // the forming bar: commits nothing

Documentation

License

BSD-3-Clause, see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TA-Lib:

Package Downloads
MoonMachine.StrategyTemplate

A template for a moonmachine strategy

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on TA-Lib:

Repository Stars
sthewissen/Mynt
An Azure Functions-based crypto currency trading bot; featuring 10 exchanges, 25 indicators, custom strategy support, backtester and more
Version Downloads Last Updated
0.8.3 704 10/25/2026
0.5.0.3 107,651 9/6/2013