add-rsi 1.1.2

Calculate Wilder RSI in DuckDB kline databases
docs.rs failed to build add-rsi-1.1.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

add-rsi

Library for calculating continuous Wilder RSI columns in DuckDB kline tables.

Use

Add the crate to your Rust project:

add-rsi = "1.1.2"

Call process_database with a database path, table name, and RSI windows:

add_rsi::process_database(
    std::path::Path::new("db/BTCUSDT.duckdb"),
    "klines",
    &[16, 64, 256],
)?;

Windows map in order to rsi_1, rsi_2, and so on. The table must contain open_time as its primary key and a close column. Missing RSI columns are added. RSI is NULL until enough price changes have been observed.

Each call reads prices in timestamp order to reconstruct the exact Wilder state, accounting for historical backfills and changed prices. Only changed RSI values are updated. Database updates run in a transaction, so a failed calculation rolls back its changes.

inspect_database reports the latest open_time and whether each configured RSI column has values at its first computable row and latest row. The literal first row is part of the warm-up period and has a NULL RSI.