Built-in signal alerts
The script sends these alerts, once per 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 Alt + A (Option + A 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
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.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:
{{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.
- 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. 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.