From 04c3a83fdb519fd7cb12581d957dd79214b5433d Mon Sep 17 00:00:00 2001 From: kingchenc Date: Sat, 23 May 2026 00:43:54 +0200 Subject: [PATCH] examples(wasm): add a browser multi-timeframe demo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close the "multi-timeframe" cell of the cross-language matrix for WASM. * examples/wasm/multi_timeframe.html — fetches the bundled 1-minute BTCUSDT CSV (or any 1-minute OHLCV CSV), rolls it up in-page to 5m, 15m, 1h, 4h and 1d buckets, and prints RSI(14), MACD(12,26,9) histogram and ADX(14) per timeframe via the WebAssembly bindings. Same inline-bucket aggregation as the Node sibling, same indicator set as the Python and Rust siblings — the Rust version uses `wickra-data::Resampler` directly which is currently a Rust-only API. The render is a single table (one row per timeframe) so the cross- language outputs sit side-by-side cleanly. The inline module script syntax-checks cleanly under `node --check`. --- examples/wasm/multi_timeframe.html | 201 +++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 examples/wasm/multi_timeframe.html diff --git a/examples/wasm/multi_timeframe.html b/examples/wasm/multi_timeframe.html new file mode 100644 index 00000000..5da857e4 --- /dev/null +++ b/examples/wasm/multi_timeframe.html @@ -0,0 +1,201 @@ + + + + + Wickra WASM — multi-timeframe + + + +

Wickra WASM — multi-timeframe

+

+ Loads a 1-minute OHLCV CSV, rolls it up to 5m / 15m / 1h / 4h / 1d + buckets in JS, and prints RSI(14), MACD(12,26,9) histogram and + ADX(14) per timeframe via the WebAssembly bindings. The browser + counterpart of examples/python/multi_timeframe.py, + examples/node/multi_timeframe.js and + examples/rust/src/bin/multi_timeframe.rs. +

+ +

+ + +

+ +

Loading WASM module…

+ + + + + + + + + + +