# Controls, Shortcuts & Agent

> Chart rail controls, legend scope toggle, slash commands, natural-language intent parsing, and Kami AI tools.

Canonical page: [https://docs.kami.trade/engine/controls/](https://docs.kami.trade/engine/controls/)

You can activate studies and indicators from the chart rail, type slash commands or plain English in chat, or ask the Kami AI assistant to analyze a chart and place overlays.

## Chart Rail & Menus

- **Studies button**: Toggles any of the 15 deterministic studies. On wide viewports where vertical space allows, study buttons appear inline along the rail; when space is tighter (or on touch devices), they fold cleanly into the **Studies** flyout menu.
- **Auto mutual exclusion**: Turning [`auto`](https://docs.kami.trade/studies/auto/) on automatically hides individual studies to keep the chart uncluttered; turning any individual study on hides `auto`.
- **Indicators button**: Toggles any of the 12 rolling indicators (`VOL`, `MA`, `EMA`, `BOLL`, `VWAP`, `SUPERTREND`, `RSI`, `MACD`, `ATR`, `ADX`, `STOCHRSI`, `OBV`). On phones (`chart.panes: off`), enabling a new sub-pane indicator replaces the active sub-pane indicator so price height is preserved; tablets and desktops allow multiple sub-panes.
- **Clear**: Removes all active study overlays and agent drawings without deleting your manual hand-drawn tools.

## Chart Legend

Anchored at the bottom-left of the price pane whenever at least one study is active:

- **Fold/unfold header**: Shows active study names plus the active candle window (`pinned 500`, `view N candles`, `extended to N`, or `capped at 2000`). Auto-folds if rows exceed one-third of the pane height.
- **`Fixed` / `View` toggle**: Switches `taScope` between pinned lookback and viewport-following scope (`aria-label="Follow chart zoom"`). Persisted in `terminal.taScope`.
- **Per-study rows**: Displays each study's active summary/parameters and an `×` button to remove that study.

## Slash Commands & Natural-Language Intents

The intent parser (`src/ta/intent.ts`) matches both explicit slash commands and natural-language requests in chat (normalizing hyphens and underscores to spaces):

| Study | Slash command | Recognized words & phrases |
| --- | --- | --- |
| [`sr`](https://docs.kami.trade/studies/sr/) | `/sr` | `support`, `resistance`, `levels`, `horizontals`, `s/r`, `lvl` |
| [`trend`](https://docs.kami.trade/studies/trend/) | `/trend` | `trend`, `trendline`, `trendlines`, `tl`, `tls` |
| [`channel`](https://docs.kami.trade/studies/channel/) | `/channel` | `channel`, `channels`, `parallel`, `ch` |
| [`fib`](https://docs.kami.trade/studies/fib/) | `/fib` | `fib`, `fibo`, `fibonacci`, `retracement`, `retrace` |
| [`zones`](https://docs.kami.trade/studies/zones/) | `/zones` | `zones`, `supply`, `demand`, `sd`, `s/d`, `order block` |
| [`range`](https://docs.kami.trade/studies/range/) | `/range` | `range`, `ranges`, `box`, `consolidation` |
| [`structure`](https://docs.kami.trade/studies/structure/) | `/structure` | `structure`, `ms`, `bos`, `choch`, `swings`, `hh`, `hl`, `lh`, `ll` |
| [`fvg`](https://docs.kami.trade/studies/fvg/) | `/fvg` | `fvg`, `ifvg`, `imbalance`, `gap`, `gaps` |
| [`liquidity`](https://docs.kami.trade/studies/liquidity/) | `/liquidity` | `liquidity`, `liq`, `eqh`, `eql`, `sweep`, `sfp`, `stops`, `bsl`, `ssl`, `equal highs`, `equal lows` |
| [`vpvr`](https://docs.kami.trade/studies/vpvr/) | `/vpvr` | `vpvr`, `profile`, `poc`, `vah`, `val`, `vp` |
| [`divergence`](https://docs.kami.trade/studies/divergence/) | `/divergence` | `divergence`, `divergences`, `div`, `divs` |
| [`sessions`](https://docs.kami.trade/studies/sessions/) | `/sessions` | `sessions`, `pdh`, `pdl`, `pdm`, `pwh`, `pwl`, `asia`, `london`, `ny`, `daily open`, `weekly open`, `previous day high`, `session levels` |
| [`htf`](https://docs.kami.trade/studies/htf/) | `/htf` | `htf`, `mtf`, `higher timeframe`, `multi timeframe`, `htf levels` |
| [`avwap`](https://docs.kami.trade/studies/avwap/) | `/avwap` | `avwap`, `anchored`, `anchored vwap` |
| [`auto`](https://docs.kami.trade/studies/auto/) | `/auto` | `auto`, `analyze`, `analysis`, `mark up`, `chart` |

## Kami AI Integration & Chart Follow

- **Structured facts**: Every study emits a deterministic `facts` JSON object alongside its `drawings`. When you ask Kami AI to analyze a market, the assistant invokes the exact same deterministic engine (`show_study` / `computeStudy`) so its numbers and price levels match what is drawn on your screen.
- **Validated custom drawings**: Manual AI `draw_*` calls pass `validateAnchors()`, snapping/verifying timestamps against real loaded candles and clamping prices within `1 ATR` (`2 ATR` for curves) so the model cannot hallucinate floating levels off-chart.
- **Follow My Chart**: Study selections sync over the follow protocol up to `MAX_STUDIES = 16` (and up to `MAX_DRAWINGS = 200` manual hand-drawings).
