- Rust core: super_trend.rs (SuperTrend — ATR-banded trailing stop with
flip logic; SuperTrendOutput { value, direction }), chandelier_exit.rs
(Chandelier Exit — ATR stop hung off the window's highest high / lowest
low; ChandelierExitOutput { long_stop, short_stop }),
chande_kroll_stop.rs (Chande Kroll Stop — a two-stage ATR stop;
ChandeKrollStopOutput { stop_long, stop_short }), atr_trailing_stop.rs
(ATR Trailing Stop — a single ratcheting close-based stop). Each with a
full Indicator impl, runnable doctest and reference / property / warmup
/ reset / batch==streaming tests.
- Python: PySuperTrend / PyChandelierExit / PyChandeKrollStop /
PyAtrTrailingStop PyO3 classes (struct outputs as tuples and (n, 2)
arrays) + module registration + .pyi stubs.
- Node: explicit SuperTrendNode / ChandelierExitNode / ChandeKrollStopNode
/ AtrTrailingStopNode with SuperTrendValue / ChandelierExitValue /
ChandeKrollStopValue objects; index.d.ts and index.js updated.
- WASM: WasmSuperTrend / WasmChandelierExit / WasmChandeKrollStop /
WasmAtrTrailingStop.
- Wiki: Indicator-SuperTrend/ChandelierExit/ChandeKrollStop/
AtrTrailingStop.md plus rows in the "Trailing stop" table of
Indicators-Overview.md and entries in Home.md.
- Add clippy.toml with doc-valid-idents for the proper noun "LeBeau".
cargo fmt + clippy (core/wickra/data/wasm/node) clean; 427 core tests,
25 data tests and 61 doctests green.
7.8 KiB
Wickra
Wickra is a streaming-first technical-indicators library. Every indicator is
implemented in Rust as an O(1) state machine that consumes one input at a
time, and the same engine is exposed through ergonomic bindings for Python,
Node.js, WebAssembly, and Rust itself. The same update call you write inside
a live trading loop also drives the historical backtest of that same
strategy — there is no second code path that drifts behind the streaming one.
The project ships 25 indicators across the four classical families (trend,
momentum, volatility, volume) and a small set of supporting types (Candle,
Tick, Chain). The Rust core forbids unsafe, so every binding inherits a
memory-safe implementation. Install is one command on every supported
platform: pip install wickra, cargo add wickra, npm install wickra — no
system compilers, no C dependencies, no headers.
Wickra is licensed under the PolyForm Noncommercial 1.0.0 license. Personal projects, research, hobby trading bots, education, non-profits, and government use are all permitted; commercial sale of the software or of services built around it is not. If you want to use Wickra commercially, open an issue on GitHub to discuss a separate license.
Published versions
| Registry | Package | Version |
|---|---|---|
| crates.io | wickra |
0.1.4 |
| crates.io | wickra-core |
0.1.4 |
| crates.io | wickra-data |
0.1.4 |
| PyPI | wickra |
0.1.4 |
| npm | wickra |
0.1.4 |
| npm | wickra-wasm |
0.1.4 |
Release notes and tagged builds: https://github.com/kingchenc/wickra/releases.
Wiki contents
- Quickstart: Python —
pip install wickra, a batch RSI on a NumPy array, a streaming RSI loop, and the multi-column NaN pattern that MACD and friends share. - Quickstart: Rust —
cargo add wickra, batch and streaming via theIndicatorandBatchExttraits, and theChaincombinator. - Quickstart: Node —
npm install wickra, basicSMAandMACDcalls, and the current Windows install caveat (wickra-win32-x64-msvc@0.1.4is held by the npm spam filter). - Quickstart: WASM —
npm install wickra-wasm, building withwasm-pack, and running indicators client-side in a browser or bundler. - Data Layer — the
wickra-datacrate: the CSV reader, the tick-to-candle aggregator, the multi-timeframe resampler, and the Binance live feed. - Streaming vs Batch — the conceptual difference
between Wickra's O(1)
updateand the recompute-everything loops in batch-only libraries, with the benchmark numbers from the project README. - Warmup Periods — a verified table of every
indicator's
warmup_period(), plus the reasoning behind the off-by-one cases (RSI(14) needs 15 inputs because it needs 14 diffs). - Indicator Chaining —
Chain::new(first, second)and.then(third), with a worked EMA(14) → RSI(7) example and the rule for stacked warmups.
Indicator reference
Start with Indicators-Overview.md for the
cross-cutting taxonomy (trend / momentum / volatility / volume) and the
shared Indicator trait surface. The per-indicator pages below cover
formulas, parameters, warmup behaviour, edge cases, and verified
Rust / Python / Node examples. They are grouped by family, mirroring the
indicators/<family>/ directory layout.
Trend — smooth the price series to surface direction.
- Indicator-Sma.md
- Indicator-Ema.md
- Indicator-Wma.md
- Indicator-Dema.md
- Indicator-Tema.md
- Indicator-Hma.md
- Indicator-Kama.md
- Indicator-Smma.md
- Indicator-Trima.md
- Indicator-Zlema.md
- Indicator-T3.md
- Indicator-Vwma.md
Momentum — measure the rate of price change rather than the level.
- Indicator-Rsi.md
- Indicator-MacdIndicator.md
- Indicator-Stochastic.md
- Indicator-Cci.md
- Indicator-Roc.md
- Indicator-WilliamsR.md
- Indicator-Adx.md
- Indicator-Mfi.md
- Indicator-Trix.md
- Indicator-AwesomeOscillator.md
- Indicator-Aroon.md
- Indicator-Mom.md
- Indicator-Cmo.md
- Indicator-Tsi.md
- Indicator-Pmo.md
- Indicator-StochRsi.md
- Indicator-UltimateOscillator.md
- Indicator-Ppo.md
- Indicator-Dpo.md
- Indicator-Coppock.md
- Indicator-AroonOscillator.md
- Indicator-Vortex.md
- Indicator-MassIndex.md
Volatility — envelope width and per-bar dispersion measures.
- Indicator-BollingerBands.md
- Indicator-Atr.md
- Indicator-Keltner.md
- Indicator-Donchian.md
- Indicator-Psar.md
- Indicator-Natr.md
- Indicator-StdDev.md
- Indicator-UlcerIndex.md
- Indicator-HistoricalVolatility.md
- Indicator-BollingerBandwidth.md
- Indicator-PercentB.md
- Indicator-SuperTrend.md
- Indicator-ChandelierExit.md
- Indicator-ChandeKrollStop.md
- Indicator-AtrTrailingStop.md
Volume — price moves weighted or confirmed by traded volume.
- Indicator-Obv.md
- Indicator-Vwap.md
- Indicator-Adl.md
- Indicator-VolumePriceTrend.md
- Indicator-ChaikinMoneyFlow.md
- Indicator-ChaikinOscillator.md
- Indicator-ForceIndex.md
- Indicator-EaseOfMovement.md
See also
- Source code: https://github.com/kingchenc/wickra
- Releases: https://github.com/kingchenc/wickra/releases
- Issue tracker: https://github.com/kingchenc/wickra/issues