> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quantnomad.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Configure UT Bot v2 Alerts

> Create TradingView alerts for UT Bot v2 buy and sell signals, and send custom webhook messages using strategy order fill alerts.

UT Bot v2 can notify you when it generates a signal. Because UT Bot v2 is a TradingView **strategy**, you can create two kinds of alert from it:

| Alert type | Message | Best for |
| - | - | - |
| **alert() function calls** | Fixed by the script: `UT Bot Buy` or `UT Bot Sell` | Simple notifications |
| **Order fills** | Your own message, with strategy placeholders | Webhooks and automation that need a custom format |

## Built-in signal alerts

The script sends these alerts, once per bar close:

| Alert message | Fires when |
| - | - |
| `UT Bot Buy` | A Buy signal is confirmed at bar close |
| `UT Bot Sell` | A Sell signal is confirmed at bar close |

These fire on every signal, regardless of the backtest date range.

### Create a signal alert

**1. Set up the chart**

Open the symbol and timeframe you want to monitor, with UT Bot v2 on the chart and configured as you want.

**2. Open the Create Alert dialog**

Click the **Alert** (alarm clock) button in the top toolbar, or press <kbd>Alt</kbd> + <kbd>A</kbd> (<kbd>Option</kbd> + <kbd>A</kbd> on macOS).

**3. Choose UT Bot v2 as the condition**

In **Condition**, select **UT Bot v2**. Then choose **alert() function calls only**.

**4. Choose notifications and create**

Choose how you want to be notified (app, pop-up, email, webhook) and click **Create**. The script sets the message and the once-per-bar-close timing.

![Create Alert dialog with UT Bot v2 and alert() function calls only selected](https://mintcdn.com/quan-tribe/IHI6bkm7Vg1cRAti/images/placeholders/screenshot.svg?fit=max\&auto=format\&n=IHI6bkm7Vg1cRAti\&q=85\&s=321e11808d22264e67a4c376e1763cfb)

Create Alert dialog with UT Bot v2 and alert() function calls only selected

One alert covers both Buy and Sell signals. The message tells you which one fired.

> [!WARNING]
>
> An alert stores a copy of the settings **at the moment it's created**. If you later change UT Bot v2's inputs on the chart, the alert keeps using the old ones. Delete and recreate the alert after changing settings.

## Custom messages with order fill alerts

The built-in messages are fixed text. To send your own format, for example JSON for a webhook, use **order fill** alerts. These fire when the strategy's simulated order fills, and let you use [strategy placeholders](https://www.tradingview.com/support/solutions/43000531021-how-to-use-a-variable-value-in-alert/).

**1. Open the Create Alert dialog**

With UT Bot v2 on the chart, open **Create Alert**.

**2. Choose order fills**

In **Condition**, select **UT Bot v2**, then **Order fills only**.

**3. Write the message**

Replace the default message with your own. For example:

```json theme={null}
{
  "indicator": "UT Bot v2",
  "action": "{{strategy.order.action}}",
  "order_id": "{{strategy.order.id}}",
  "symbol": "{{exchange}}:{{ticker}}",
  "interval": "{{interval}}",
  "price": "{{strategy.order.price}}",
  "fired_at": "{{timenow}}"
}
```

`{{strategy.order.action}}` becomes `buy` or `sell`, and `{{strategy.order.id}}` becomes `Long` or `Short`.

**4. Add a webhook and create**

In **Notifications**, enable **Webhook URL**, paste your URL, and click **Create**. See [Webhook Alerts & Automation](https://docs.quantnomad.com/guides/webhooks.md).

Things to know about order fill alerts:

* **Timing.** The strategy's order is placed at the signal bar's close and fills at the next bar's open, so the alert fires slightly later than the built-in signal alert.
* **Date range.** Orders, and therefore order fill alerts, only happen inside the [backtest date range](https://docs.quantnomad.com/free-indicators/ut-bot-v2/settings.md#backtesting-range). With the defaults, they stop after 2030-01-01. Turn off **Use Backtest Date Range** if you want them to run indefinitely.
* **Don't combine.** If you choose **Order fills and alert() function calls**, you'll get two alerts per signal.

## Related pages

* [Creating TradingView Alerts](https://docs.quantnomad.com/guides/tradingview-alerts.md)
* [Webhook Alerts & Automation](https://docs.quantnomad.com/guides/webhooks.md)
* [Troubleshooting](https://docs.quantnomad.com/support/troubleshooting.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.