Commit Graph

2 Commits

Author SHA1 Message Date
kingchenc 2eabda5fa3 examples(node): add an offline backtest example
The Node binding shipped only one example (a synthetic streaming demo),
while Python and Rust both have a CSV backtest. Add the Node counterpart of
examples/python/backtest.py and crates/wickra/examples/backtest.rs: it reads
an OHLCV CSV, streams every candle through a basket of indicators (SMA, EMA,
RSI, MACD, Bollinger Bands, ATR, ADX, OBV) via the O(1) update call, and
prints a per-series summary.

With no argument it runs against the bundled BTCUSDT daily dataset, so it is
runnable out of the box; pass a path to use any other OHLCV CSV.
2026-05-22 22:43:21 +02:00
kingchenc b919c33dee E17: add a runnable Node example
bindings/node had no examples/ directory — the README pointed at a test
file as its "Example". (bindings/wasm/examples/index.html already
exists and is a complete browser demo, so only the Node side was
missing.)

Add bindings/node/examples/streaming.js: a deterministic synthetic
price series fed tick by tick through SMA, EMA, RSI and MACD, printing
a status line and flagging overbought/oversold candidates — the same
O(1)-per-update streaming model a live bot would use. Verified against
the built native module.
2026-05-22 16:22:52 +02:00