# Kami Terminal

> Technical documentation for Kami Terminal's deterministic TA engine, 15 chart studies, and 12 real-time rolling indicators.

Kami separates chart analysis into 15 closed-bar deterministic studies (executed off-thread in a Web Worker with Zig/WASM SIMD kernels) and 12 rolling indicators (computed incrementally in O(1) per live tick with bit-exact Object.is parity against batch reference kernels). Structural studies default to a pinned 500-candle lookback (`Fixed` scope) so zooming never shifts levels, while `vpvr` stays view-adaptive. Parameters and `VWAP` UTC resets adapt automatically by timeframe, and multi-timeframe studies (`sessions`, `htf`, `auto`) enforce strict `min(now, windowEnd)` lookahead clamping.

Reading order: Engine Architecture, Windowing & Scope, Timeframes & Multi-Timeframe, Controls & Shortcuts, Studies Overview, individual study references, Indicators Overview, Overlay Indicators, Oscillators & Volume.

## Engine

- [Architecture & Determinism](https://docs.kami.trade/engine/architecture/index.md): Pure functional studies, Zig/WASM SIMD dual backend, Web Worker pre-warming, closed-bar stability, zero-lookahead guards, all 10 drawing primitives, label priority, and validation rules.
- [Windowing & Scope](https://docs.kami.trade/engine/windowing/index.md): Fixed vs View scope (`taScope`), `MIN_CANDLES`/`EXTEND_TO`/`MAX_VIEW`/`WARM_UP` constants, why `vpvr` stays view-adaptive, and explicit `window` overrides.
- [Timeframes & Multi-Timeframe](https://docs.kami.trade/engine/timeframes/index.md): `TF_DEFAULTS` parameter scaling (`<= 5m` and `>= 1d`), automatic Daily/Weekly/Monthly UTC `VWAP` anchoring, and the zero-adapter hybrid HTF candle pipeline (`HTF_MAP`, boundary rollover, lookahead clamp).
- [Controls, Shortcuts & Agent](https://docs.kami.trade/engine/controls/index.md): Chart rail controls, legend scope toggle, slash commands, natural-language intent matching, Kami AI tools, and Follow My Chart limits.

## Studies

- [Studies Overview](https://docs.kami.trade/studies/index.md): Matrix of all 15 deterministic studies, categories, Fixed-scope behavior, HTF usage, primary drawings, and slash commands.
- [Support & Resistance](https://docs.kami.trade/studies/sr/index.md): Multi-scale fractal swing clustering weighted by recency, volume, wick rejection, and major pivots, plus dynamic-ATR flip/break tracking.
- [Trendlines](https://docs.kami.trade/studies/trend/index.md): Zero-close-violation rising support and falling resistance rays with touch deduplication and 2-touch fallback.
- [Channels](https://docs.kami.trade/studies/channel/index.md): Parallel trend channels fitted from top trendlines with opposite-rail touches, containment scoring, and 50% median line.
- [Range Box](https://docs.kami.trade/studies/range/index.md): ATR-bounded consolidation boxes with wick/reclaim deviation tracking, compression ratio, and breakout status.
- [Fibonacci Retracements](https://docs.kami.trade/studies/fib/index.md): ATR-zigzag swing detection with Golden Pocket (`0.618–0.65`) shading, OTE bounds, efficiency ratio, and optional `1.272`/`1.618` extensions.
- [Market Structure](https://docs.kami.trade/studies/structure/index.md): Internal and external alternating swings, causal BOS/CHoCH detection, and dealing-range equilibrium (`EQ`).
- [Supply & Demand Zones](https://docs.kami.trade/studies/zones/index.md): Basing-candle impulse zones with volume/FVG confluence, penetration tracking, and broken-zone pruning.
- [Fair Value Gaps](https://docs.kami.trade/studies/fvg/index.md): Three-candle BISI/SIBI imbalances, Consequent Encroachment (`CE`) tracking, partial fills, and Inverted FVGs (`IFVG`).
- [Liquidity Pools](https://docs.kami.trade/studies/liquidity/index.md): Resting equal highs (`BSL`) and equal lows (`SSL`) pools paired with causal Swing Failure Pattern (`SFP`) sweep marks.
- [Volume Profile (VPVR)](https://docs.kami.trade/studies/vpvr/index.md): View-adaptive buy/sell volume histogram with `POC`, 2-bin lookahead Value Area (`VAH`/`VAL`), `HVN`/`LVN` nodes, and volume skew.
- [Divergences](https://docs.kami.trade/studies/divergence/index.md): Regular and hidden RSI and MACD histogram divergences with clean-path validation and dual-oscillator confluence boost.
- [Sessions & Key Levels](https://docs.kami.trade/studies/sessions/index.md): UTC daily/weekly levels (`PDH`, `PDL`, `PDM`, `DO`, `PWH`, `PWL`, `WO`) with swept detection plus Asia, London, and NY session boxes.
- [Higher Timeframe (HTF)](https://docs.kami.trade/studies/htf/index.md): Projected HTF S/R bands, unfilled FVGs, and dealing-range `EQ` with graceful band-to-level fallbacks and cross-TF alignment.
- [Anchored VWAP (AVWAP)](https://docs.kami.trade/studies/avwap/index.md): West-Welford AVWAP curves anchored to latest zigzag swing high, swing low, and highest-volume impulse candle with optional clamped `±1σ` bands.
- [Auto Confluence](https://docs.kami.trade/studies/auto/index.md): Composite ~12-drawing overlay with deterministic market regime classification, multi-timeframe bias scoring, and ATR-clustered confluence zones.

## Indicators

- [Indicators Overview](https://docs.kami.trade/indicators/index.md): Matrix of all 12 rolling indicators, O(1) incremental checkpointing, Neumaier summation, and TA-Lib seeding.
- [Overlay Indicators](https://docs.kami.trade/indicators/overlays/index.md): Exact formulas and defaults for `MA`, `EMA`, `BOLL`, auto-anchored `VWAP`, and `SUPERTREND`.
- [Oscillators & Volume](https://docs.kami.trade/indicators/oscillators/index.md): Exact formulas and defaults for `VOL`, `RSI`, `MACD`, `ATR`, `ADX`, `STOCHRSI`, and `OBV`.

## Complete Export

- [Full documentation (Markdown)](https://docs.kami.trade/llms-full.txt): Single-file export of every documentation page in reading order.
