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.
This commit is contained in:
kingchenc
2026-05-23 11:03:53 +02:00
parent 6fd110b4ce
commit a32719d709
+24 -3
View File
@@ -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