# Settings

> Environment variables, preferences and built-in defaults.

Most of Flowscope is configured in the interface and saved with your layouts and preferences. A few switches are environment variables, read once at start.

## Environment variables

All of these apply to the desktop app. The browser build reads none of them; it only looks for `sim` and `hub` in the page's query string (see [History and data](/docs/app/history-and-data#hub)).

| Variable | Values | Effect |
|---|---|---|
| `FLOWSCOPE_SIM` | Any value | Run on the built-in simulator instead of live data |
| `FLOWSCOPE_PRESET` | `orderflow`, `liquidity`, `venues`, `stress`, `flow` | Start from this preset instead of the saved layout |
| `FLOWSCOPE_PERF` | Any value | Open the performance overlay at start |
| `FLOWSCOPE_OPEN` | `search`, `indicators`, `interval`, `objects` | Open symbol search, the indicator dialog, the custom interval dialog or the object tree at start |
| `FLOWSCOPE_TOOL` | `trend`, `fib`, `long` | Start with the trend line, Fib retracement or long position tool |
| `FLOWSCOPE_HUB_URL` | A URL, for example `http://127.0.0.1:8790` | Take every market and its history from this data hub. Unset: the hub the app was built with, if any. Empty: no hub, and so no market data. |
| `FLOWSCOPE_HUB_KEY` | A key | The key shown to the hub, if it asks for one |
| `FLOWSCOPE_TZ_OFFSET` | Minutes east of UTC, for example `120` or `-300` | Override the machine's offset for the **Local time** zone |
| `RUST_LOG` | A log filter, for example `info` or `flowscope_engine=debug` | Log level. The desktop defaults to `warn`. |

> [!WARNING]
> Variables marked "any value" only check that the variable is set. `FLOWSCOPE_SIM=0` still starts the simulator. Unset the variable to turn the switch off.

### Presets

| `FLOWSCOPE_PRESET` | Preset |
|---|---|
| `orderflow` | Orderflow desk |
| `liquidity` | Liquidity |
| `venues` | BTC on every venue |
| `stress` | 60 charts (load test) |
| `flow` | Flow studies: a developer layout with every flow study, not offered in the menu |

For the regular starting chart and included community layouts, see [Layouts](/docs/app/layouts#starting-a-layout). A preset from the environment is shown instead of the restored layout. The open layout keeps its name, and with autosave on, what is on screen is saved to it as usual.

### Examples

```bash
# Simulator with the performance overlay
FLOWSCOPE_SIM=1 FLOWSCOPE_PERF=1 ./target/release/flowscope

# Live, every market and its history from a hub on another machine
FLOWSCOPE_HUB_URL=https://hub.example.com ./target/release/flowscope

# Start from the Orderflow desk preset instead of the saved layout
FLOWSCOPE_PRESET=orderflow ./target/release/flowscope
```

## Preferences

Preferences outlive layouts and apply everywhere. They are edited in the interface.

| Preference | Where to change it | Default |
|---|---|---|
| Favourite intervals | Stars in the interval menu | `1m`, `5m`, `15m`, `1h`, `4h`, `1D` |
| Custom intervals | **Add custom interval…** | None |
| Favourite chart types | Stars in the chart type menu | Candles, Footprint, Liquidity |
| Favourite studies | Stars in the indicator dialog | Liquidity Heatmap, CVD, Volume Profile, VWAP |
| Indicator templates | Templates button in the top bar | None |
| Time zone | Clock in the bottom bar | UTC |
| Autosave | Layout menu | On |
| Magnet | Tool rail | Off |
| Stay in drawing mode | Tool rail | Off |
| Recent symbols | Remembered from symbol search | The last 12 |
| Crosshair sync across charts | Settings › General › Charts | On |
| The crosshair of a linked chart stays in its link group | Settings › General › Charts | Off |
| Linked charts share drawings | Settings › General › Charts | On |
| Theme: Dark, Midnight (blue-tinted), Graphite (lighter grey) or Black (OLED) | Settings › General › Interface; applies at once | Dark |
| Interface scale | Settings › General › Interface | 100 % |

### Time zones

The clock menu offers UTC, local time and fixed offsets: Los Angeles (UTC−8), New York (UTC−5), Berlin (UTC+1), Berlin summer (UTC+2), Dubai (UTC+4), Singapore (UTC+8) and Tokyo (UTC+9).

Fixed offsets do not follow daylight saving. **Local time** follows your machine and is re-read every minute. Trading sessions in [profiles](/docs/app/profiles#sessions) follow their own exchange clocks regardless of this setting.

## Per-chart settings

Saved with the layout. See [Charts](/docs/app/charts#chart-settings).

| Setting | Default |
|---|---|
| Chart type | Depends on the pane: candles, footprint or liquidity |
| Footprint cells | Bid × Ask |
| Up, down and wick colours | `#22AB94` up, `#F23645` down |
| Line colour | `#2962FF` |
| Logarithmic scale | Off |
| Last price line, countdown to bar close | On |
| Grid | On |
| Watermark | Off |
| Legend: OHLC, indicator titles, indicator values | On |

Ladder and depth book settings are listed in [DOM and tape](/docs/app/dom-and-tape).

## Built-in defaults

These are fixed in the engine today and not exposed as settings.

| Default | Desktop | Browser |
|---|---|---|
| Memory budget for markets | 3 GB | 768 MB |
| One-minute candles loaded at start | 3 days, from the data hub | 3 days, from the data hub |
| Raw tape seeded at start | The hub's last 30 minutes of trades | Same |
| Footprint and heatmap history | What the hub recorded | Same |
| Engine time per frame | — (own threads) | 8 ms |

## Where settings are stored

| What | Desktop | Browser |
|---|---|---|
| Layouts, preferences, side panel | `<data dir>/flowscope/store/` | `localStorage` |
| Market history | Not stored: it comes from the data hub each session | Not stored |
| Snapshots | `~/Pictures/flowscope-<seconds>.png`, or your home folder | Clipboard only |

See [Layouts](/docs/app/layouts#what-is-stored-where) for the storage keys and [History and data](/docs/app/history-and-data#local-persistence) for what the app keeps on the machine.
