# Alerts

> Price, line, indicator, large-trade and liquidation alerts, with a notification and a sound.

An alert watches a market and tells you when something happens: a notification in the app and, if you like, a sound.

## Create one

| From | Alert |
|---|---|
| Right-click a chart at a price, **Add alert at …** | The price crossing that level |
| A selected trend or horizontal line, the bell in its toolbar | The price crossing the line |
| An indicator's legend row, **Add alert…** | A line of the indicator crossing a value, the price or another of its lines |
| A watchlist row, **Add alert…** | The price crossing a level on that market |
| The **Alerts** panel (bell in the right rail), **+** | Any of these on the active market, including large trades and liquidations |

On a phone, press and hold the chart at a price instead of right-clicking.

## Conditions

| Condition | Fires when |
|---|---|
| Price crossing | The last price crosses the level, either way |
| Price crossing up, crossing down | Only in that direction |
| Line | The last price crosses a drawn line, as far as the line reaches |
| Indicator | The indicator line crosses its target on the newest bar of the chosen interval |
| Trade of at least (USD) | A single print, or a taker order's prints within one millisecond, reaches that notional |
| Liquidation of at least (USD) | A liquidation of at least that notional |

Indicator alerts work with indicators computed from bars (moving averages, RSI, MACD, bands and the like), not with order-flow studies.

**Trigger** is **Once** (the alert switches off after firing) or **Every time**. An alert that fires every time has a **Cooldown** (none, 10 seconds, 1, 5 or 15 minutes, 1 hour): after firing it stays quiet that long, so a price wobbling around a level does not ring every second. **Sound** is Chime, Ping, Bell, Alarm or none; the play button beside it previews the sound. Sounds can be turned off for all alerts in **Settings › General**.

### Message templates

The **Message** is added after the description (`BTCUSDT crossing 85,300 · your message`). Once it names a placeholder it becomes the whole text instead:

| Placeholder | Becomes |
|---|---|
| `{symbol}`, `{venue}` | The market, for example `BTCUSDT` and `Binance Futures` |
| `{price}` | The last price when it fired |
| `{alert}` | What happened: `BTCUSDT crossing 85,300` |
| `{message}` | The message itself (for webhook bodies) |
| `{count}` | How many times the alert has fired, this time included |
| `{time}`, `{ts}` | When: `14:05:09` (UTC), or milliseconds since 1970 |

For example `{symbol} broke {price} ({count}×)` shows `BTCUSDT broke 85,301.5 (3×)`.

## Where alerts run

Alerts are checked by the app itself, every frame, against the live data of their markets; the app keeps those markets open while an alert watches them. They fire while Flowscope runs, on the device where they are. Signed in, alerts sync to your account with your other preferences.

[Flowscope Script](/docs/scripting) raises its own alerts with `alert`; they arrive as the same notifications.

## Sending alerts elsewhere

Settings › General › Alerts sends every fired alert to other places as well:

| Field | What it sends |
|---|---|
| Discord webhook | The alert's text to the channel of a Discord webhook (Channel settings › Integrations › Webhooks) |
| Telegram bot token and chat id | The text to a chat through your bot (`sendMessage`); both are needed |
| Webhook URL | A JSON post: `{"text": …, "ts": …, "source": "flowscope"}` |
| Webhook body | Your own JSON for the webhook URL instead, with the placeholders above and `{text}` (the alert's text). Values are escaped for JSON, so `{"content": "{alert} at {price}", "fired": {count}}` stays valid JSON whatever the message holds. |

Only `https://` addresses are used. **Send a test alert** fires one through all of them. Alerts are sent from the window that fires them, while Flowscope runs. A failed delivery is logged by host and status only, because webhook addresses contain their secrets.
