Files
wickra/bindings/csharp
kingchenc b1653e2107 release: bump 0.8.6 -> 0.8.7 (#263)
Version bump `0.8.6` → `0.8.7`.

### Added
- R binding: a *Getting started* vignette and a synthetic `sample_ohlcv` example dataset, giving new users a runnable, self-contained walkthrough and populating the R-universe Articles and Datasets tabs. The vignette's code is exercised in CI so a broken example is caught before the published build. (#262)

Bump touches the manual release touchpoints only; docs/webpage version strings are left to `sync-about.yml` on the tag.
2026-06-11 21:47:50 +02:00
..

Wickra — .NET

CI codecov NuGet License: MIT OR Apache-2.0

Streaming-first technical indicators for .NET. dotnet add package Wickra — prebuilt native library, no system dependencies.

Wickra is a multi-language technical-analysis library with a Rust core and bindings for Python, Node.js and WebAssembly, plus a C ABI for C/C++, C#, Go, Java, R and any other C-capable language. Every indicator is an O(1) streaming state machine, so live trading bots and historical backtests share the exact same implementation. This package is the .NET binding; it consumes the C ABI hub through [LibraryImport] P/Invoke and exposes all 514 streaming-first indicators as idiomatic IDisposable classes.

Install

dotnet add package Wickra

The native library ships prebuilt per platform (Linux, macOS, Windows — x64 and arm64) under runtimes/<rid>/native/, selected automatically. There is nothing to compile. Targets .NET 8 and later.

Quick start

using Wickra;

// Batch: run an indicator over a whole series (NaN at warmup positions).
var prices = Enumerable.Range(0, 1000).Select(i => 100.0 + i * 0.1).ToArray();
using var sma = new Sma(20);
double[] values = sma.Batch(prices);

// Streaming: the same indicator, fed tick by tick in O(1).
using var rsi = new Rsi(14);
foreach (var price in liveFeed)
{
    var value = rsi.Update(price); // NaN during warmup, no recomputation
    if (double.IsFinite(value) && value > 70)
    {
        Console.WriteLine("overbought");
    }
}

Batch(prices) and feeding the same prices through Update() produce identical values — the equivalence is enforced by the test suite. Multi-output indicators (MACD, Bollinger, ADX, …) return a nullable record struct, null while warming up.

Benchmark

benchmarks/ reports streaming and batch updates-per-second for SMA, ATR and MACD. It measures this binding's FFI overhead, not a cross-library ratio (the same Rust core runs under every binding) — see the repository BENCHMARKS.md §3.

cargo build -p wickra-c --release
dotnet run -c Release --project benchmarks

Documentation

The full indicator catalogue, guides, quickstarts, and API reference live in the main repository and documentation site:

Wickra ships native bindings for Python, Node.js, WebAssembly and Rust, plus a C ABI hub that any C-capable language (C, C++, Go, C#, Java, R) links against — all exposing the same indicators from the shared, unsafe-forbidden Rust core.

Disclaimer

Wickra is an indicator toolkit, not a trading system. The values it computes are deterministic transforms of the input data — they are not financial advice and do not predict the market. Any use in a live trading context is at your own risk. The library is provided as is, without warranty of any kind.

License

Licensed under either of Apache-2.0 or MIT at your option.