From a32719d70958e7273b7870c1ae16b0fdd6f8f219 Mon Sep 17 00:00:00 2001 From: kingchenc Date: Sat, 23 May 2026 11:03:53 +0200 Subject: [PATCH] docs(wiki): expand WASM Quickstart for the full multi-output surface (R3) The Quickstart-WASM page only mentioned `MACD` and `BollingerBands` as multi-output indicators. After R3 (this branch) every candle-input WASM class also exposes a structured `update`: `Stochastic`, `ADX`, `Keltner`, `Donchian`, `Aroon` (plus `SuperTrend`, which has always been there). The "Multi-output indicators" section now lists every multi-output shape in a table, and a short note at the end calls out the 0.1.5 parity: every candle-input indicator ships `update` / `batch` / `reset` / `isReady` / `warmupPeriod`, so browser code doesn't need to replay `batch` on each tick anymore. --- docs/wiki/Quickstart-WASM.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/docs/wiki/Quickstart-WASM.md b/docs/wiki/Quickstart-WASM.md index fae57426..0e4be2f4 100644 --- a/docs/wiki/Quickstart-WASM.md +++ b/docs/wiki/Quickstart-WASM.md @@ -80,7 +80,19 @@ recomputing history on each tick. ## Multi-output indicators -`MACD` and `BollingerBands` return a structured object from `update`: +Several indicators return a structured object from `update` (or `null` during +warmup). The full list and their field names: + +| Indicator | `update` return shape | +|---------------------|--------------------------------------------------| +| `MACD` | `{ macd, signal, histogram }` | +| `BollingerBands` | `{ upper, middle, lower, stddev }` | +| `Stochastic` | `{ k, d }` | +| `ADX` | `{ plusDi, minusDi, adx }` | +| `Keltner` | `{ upper, middle, lower }` | +| `Donchian` | `{ upper, middle, lower }` | +| `Aroon` | `{ up, down }` | +| `SuperTrend` | `{ value, direction }` | ```javascript import init, { MACD } from "wickra-wasm"; @@ -96,8 +108,17 @@ console.log(last); ``` `batch` returns a flat `Float64Array`; multi-output indicators interleave -their fields per row (`[macd0, signal0, hist0, macd1, ...]`). The exact -layout is documented in the generated `pkg/wickra_wasm.d.ts`. +their fields per row (e.g. MACD: `[macd0, signal0, hist0, macd1, ...]`). The +exact layout is documented in the generated `pkg/wickra_wasm.d.ts`. + +> Since `wickra-wasm@0.1.5`, every candle-input indicator (ATR, ADX, +> WilliamsR, CCI, MFI, PSAR, Keltner, Donchian, VWAP, RollingVWAP, +> AwesomeOscillator, Aroon, Stochastic, OBV, and the rest of the +> volume / volatility / trailing-stop / price-statistics families) exposes +> the same streaming API as `MACD` here — `update`, `batch`, `reset`, +> `isReady` and `warmupPeriod`. Earlier releases only shipped `batch` for +> twelve of these classes; browser code no longer needs to replay `batch` +> on every tick. ## Errors