F8: add Bollinger Bandwidth and %b

Completes the F8 family (Bands & channels) end to end:

- Rust core: bollinger_bandwidth.rs ((upper - lower) / middle — the
  squeeze gauge) and percent_b.rs ((price - lower) / (upper - lower) —
  price position within the bands, unclamped). Both wrap BollingerBands
  and carry a full Indicator impl, runnable doctest and reference /
  constant-series / definition-consistency / warmup / reset /
  batch==streaming tests.
- Python: PyBollingerBandwidth / PyPercentB PyO3 classes + module
  registration + .pyi stubs (defaults (20, 2.0)).
- Node: explicit BollingerBandwidthNode and PercentBNode; index.d.ts
  and index.js updated.
- WASM: WasmBollingerBandwidth / WasmPercentB via the scalar macro.
- Wiki: Indicator-BollingerBandwidth.md and Indicator-PercentB.md plus
  rows in Indicators-Overview.md and entries in Home.md.

cargo fmt + clippy (core/wickra/data/wasm/node) clean; 362 core tests,
25 data tests and 51 doctests green.
This commit is contained in:
kingchenc
2026-05-22 18:30:49 +02:00
parent 6c58d3827c
commit 99dd144576
13 changed files with 907 additions and 7 deletions
+4
View File
@@ -10,6 +10,7 @@ mod aroon_oscillator;
mod atr;
mod awesome_oscillator;
mod bollinger;
mod bollinger_bandwidth;
mod cci;
mod cmo;
mod coppock;
@@ -27,6 +28,7 @@ mod mfi;
mod mom;
mod natr;
mod obv;
mod percent_b;
mod pmo;
mod ppo;
mod psar;
@@ -57,6 +59,7 @@ pub use aroon_oscillator::AroonOscillator;
pub use atr::Atr;
pub use awesome_oscillator::AwesomeOscillator;
pub use bollinger::{BollingerBands, BollingerOutput};
pub use bollinger_bandwidth::BollingerBandwidth;
pub use cci::Cci;
pub use cmo::Cmo;
pub use coppock::Coppock;
@@ -74,6 +77,7 @@ pub use mfi::Mfi;
pub use mom::Mom;
pub use natr::Natr;
pub use obv::Obv;
pub use percent_b::PercentB;
pub use pmo::Pmo;
pub use ppo::Ppo;
pub use psar::Psar;