Trading Alerts
TradeStaq includes a comprehensive alert system that notifies you about trading activity, risk events, and strategy signals. This guide explains how to configure and use trading alerts.
Overview
The alert system provides:
- Trade Notifications - Entry and exit alerts
- Risk Alerts - A risk limit reached, and lifted
- Strategy Alerts - Custom alerts from your strategies
- Multi-Channel - Email and Telegram support
- Smart Throttling - Prevents notification spam
Alert Types
Trade Alerts
| Alert | Description | Default |
|---|---|---|
| Trade Entry | Position opened | ✓ Enabled |
| Trade Exit | Position closed | ✓ Enabled |
| Order Filled | Order executed | ✓ Enabled |
| Order Cancelled | Order cancelled | Optional |
Risk Alerts
| Alert | Description | Trigger |
|---|---|---|
| Risk limit reached: no new trades | The bot stops opening trades and keeps managing its open position | One of the bot's risk limits is reached |
| Risk limit lifted: trading resumed | The bot may open trades again | The next day or week starts (daily / weekly limits), or you raise or remove the limit |
| Bot paused: position closed (risk limit) | The bot is paused once its position has closed | Pause once flat is on and the position closes after a limit was reached |
| Exposure cap reached: new trades refused | No new position opens on that exchange account | The account's open positions reach its exposure cap (at most once per account per day) |
There is no early warning before a limit is reached, and a risk limit never closes a position for you. The first two alerts are sent only while the bot's Tell me when a limit is reached and when it lifts setting is on. See Risk Management for how each limit is measured.
System Alerts
| Alert | Description |
|---|---|
| Connection Error | Exchange disconnected |
| Strategy Error | Strategy execution failed |
| Balance Warning | Low balance detected |
Setting Up Alerts
1. Access Notification Settings
- Navigate to Settings → Notifications
- Or click the bell icon in the top navigation
2. Connect Email
Email alerts are enabled by default using your account email.
To change:
- Go to Settings → Account
- Update your email address
- Verify the new email
3. Connect Telegram
For instant mobile notifications:
- Start the Bot: Message @TradeStaqBot on Telegram
- Get Your Chat ID: Send
/startto receive your Chat ID - Enter Chat ID: Paste in Settings → Notifications → Telegram Chat ID
- Test Connection: Click "Send Test Message"
4. Configure Alert Preferences
For each alert type, you can:
- Enable/disable the alert
- Choose delivery channels (Email, Telegram, or both)
- Set the risk limits themselves on each bot's Risk limits card (see Risk Management)
Alert Configuration
Basic Settings
{
"emailEnabled": true,
"telegramEnabled": true,
"tradeAlerts": true,
"riskAlerts": true,
"systemAlerts": true
}
Advanced Settings
{
"maxAlertsPerHour": 20,
"throttleSeconds": 60,
"emailEnabled": true,
"telegramEnabled": true
}
| Setting | Description | Default |
|---|---|---|
maxAlertsPerHour | Maximum alerts per hour | 20 |
throttleSeconds | Seconds between same alerts | 60 |
emailEnabled | Send email alerts | true |
telegramEnabled | Send Telegram alerts | false |
Alert Levels
Alerts have different severity levels:
| Level | Icon | Use Case | Throttling |
|---|---|---|---|
| Info | ℹ️ | General information | Standard |
| Warning | ⚠️ | Potential issues | Standard |
| Error | ❌ | Critical problems | Bypass |
| Trade Entry | 🟢 | Position opened | Standard |
| Trade Exit | 🔴 | Position closed | Standard |
Priority Handling
- Critical alerts (errors, risk breaches) bypass throttling
- Trade alerts follow standard throttling
- Info alerts are most throttled to prevent spam
Custom Strategy Alerts
Send alerts from your TradeStaq strategies:
Basic Alert
td.alert({
level: 'info',
title: 'Signal Detected',
message: 'RSI oversold condition met',
});
Alert with Data
td.alert({
level: 'warning',
title: 'High Volatility Detected',
message: 'ATR has exceeded 2x normal range',
data: {
currentATR: atrValue,
normalATR: avgATR,
ratio: atrValue / avgATR,
},
});
Trade Entry Alert
// Automatic alert on trade entry
td.trade.long({
size: 0.1,
alertTitle: 'Long Entry - BTC',
alertMessage: 'RSI oversold + MA crossover confirmed',
alertData: {
rsi: currentRSI,
entryPrice: td.market.price,
stopLoss: stopLossPrice,
},
});
Alert Levels in Strategies
// Info - General information
td.alert({ level: 'info', title: 'Strategy Started', message: '...' });
// Warning - Potential concerns
td.alert({ level: 'warning', title: 'Approaching Limit', message: '...' });
// Error - Critical issues
td.alert({ level: 'error', title: 'Execution Failed', message: '...' });
// Trade Entry
td.alert({ level: 'trade_entry', title: 'Position Opened', message: '...' });
// Trade Exit
td.alert({ level: 'trade_exit', title: 'Position Closed', message: '...' });
Throttling
Throttling prevents alert spam when markets are volatile.
How Throttling Works
- Same Alert Throttle: Same alert title won't repeat for X seconds
- Hourly Limit: Maximum alerts per hour per bot
- Critical Bypass: System errors bypass throttling
Default Throttle Settings
┌─────────────────────────────────────────────────────────────┐
│ THROTTLE BEHAVIOR │
│ │
│ Alert: "RSI Oversold" │
│ │
│ 12:00:00 → Sent ✓ │
│ 12:00:30 → Throttled (60s not elapsed) │
│ 12:01:15 → Sent ✓ │
│ 12:02:00 → Sent ✓ │
│ │
│ Hourly Count: 3 of 20 │
└─────────────────────────────────────────────────────────────┘
Adjusting Throttle
For high-frequency strategies:
{
"maxAlertsPerHour": 50,
"throttleSeconds": 30
}
For low-frequency strategies:
{
"maxAlertsPerHour": 10,
"throttleSeconds": 300
}
Alert Formats
Email Alert Example
Subject: [TRADE_ENTRY] Long Entry - BTC - MyTradingBot
┌─────────────────────────────────────────────────────────────┐
│ │
│ 🟢 TradeStaq Alert │
│ MyTradingBot • BTC/USDT │
│ │
├─────────────────────────────────────────────────────────────┤
│ │
│ Long Entry - BTC │
│ RSI oversold + MA crossover confirmed │
│ │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Additional Data │ │
│ │ • RSI: 28.5 │ │
│ │ • Entry Price: $50,123.45 │ │
│ │ • Stop Loss: $49,120.98 │ │
│ └────────────────────────────────────────────────────────┘ │
│ │
├─────────────────────────────────────────────────────────────┤
│ Jan 12, 2026 10:30:45 AM • Alert Level: TRADE_ENTRY │
└─────────────────────────────────────────────────────────────┘
Telegram Alert Example
🟢 TradeStaq Alert
MyTradingBot • BTC/USDT
Long Entry - BTC
RSI oversold + MA crossover confirmed
Data:
• RSI: 28.5
• Entry Price: $50,123.45
• Stop Loss: $49,120.98
Jan 12, 2026 10:30:45 AM • TRADE_ENTRY
Risk Alert Examples
Daily Loss Limit Reached
Sent as a warning when the bot's loss today reaches its daily limit (here 3% of the account):
Risk limit reached: no new trades
Your bot "MyTradingBot" reached a risk limit: daily loss 3.25% of the account
(limit 3%). It will not open new trades; it keeps managing and closing its
open position.
The alert also says when the limit lifts: at 00:00 UTC for a daily limit, and Monday 00:00 UTC for a weekly one. A drawdown or losing-streak limit does not lift by itself: restart the bot, or raise or remove the limit. With Pause once flat on, the alert says instead that the bot is paused once its position closes.
The bot is not paused while it holds a position. Until the limit lifts it opens nothing, while its stop loss, take profit and exits keep running.
Limit Lifted
Sent when the limit no longer applies:
Risk limit lifted: trading resumed
Your bot "MyTradingBot" may open new trades again: its risk limits are no
longer breached.
Starting a Bot Again the Same Day
If Pause once flat paused the bot after a daily (or weekly) limit and you start it again before the limit lifts, the bot runs but opens nothing until 00:00 UTC (Monday 00:00 UTC for a weekly limit), and its alert names the time it lifts. A drawdown or losing-streak limit starts afresh when you start the bot.
Notification Channels
Pros:
- Reliable delivery
- Full formatting support
- Permanent record
- Works offline (queued)
Cons:
- Slower delivery (seconds to minutes)
- May go to spam
- Requires email checking
Best For:
- Trade summaries
- End-of-day reports
- Critical system alerts
Telegram
Pros:
- Instant delivery
- Mobile notifications
- Real-time awareness
- Easy setup
Cons:
- Requires Telegram app
- May miss if phone is silent
- Limited formatting
Best For:
- Trade entry/exit alerts
- Risk warnings
- Real-time monitoring
Recommended Setup
For active trading:
- Telegram: Trade alerts, risk warnings
- Email: Daily summaries, critical errors
For passive monitoring:
- Email: All alerts
- Telegram: Critical only
Managing Alert Volume
Strategy 1: Filter by Level
Only enable critical alerts:
{
"infoAlerts": false,
"warningAlerts": true,
"errorAlerts": true,
"tradeAlerts": true
}
Strategy 2: Channel by Type
- Trade alerts → Telegram only
- Risk alerts → Both
- System alerts → Email only
Strategy 3: Increase Throttle
For noisy strategies:
{
"throttleSeconds": 300,
"maxAlertsPerHour": 10
}
Strategy 4: Alert in Strategy
Control alerts from your strategy logic:
// Only alert on significant moves
if (pnlPercent > 2 || pnlPercent < -1) {
td.alert({
level: 'info',
title: 'Significant P&L',
message: `Position P&L: ${pnlPercent.toFixed(2)}%`,
});
}
Troubleshooting
Not Receiving Email Alerts
- Check spam/junk folder
- Add noreply@tradestaq.com to contacts
- Verify email in Settings → Account
- Check alert preferences are enabled
Not Receiving Telegram Alerts
- Verify Chat ID is correct
- Send
/startto @TradeStaqBot again - Check Telegram notifications are on
- Test with "Send Test Message" button
Too Many Alerts
- Increase
throttleSeconds - Reduce
maxAlertsPerHour - Disable info-level alerts
- Review strategy alert logic
Alerts Delayed
- Email delivery can take 1-5 minutes
- Telegram should be instant
- Check TradeStaq status page
- High load may cause delays
Duplicate Alerts
- Check throttle settings
- Review strategy for duplicate calls
- Ensure only one bot per exchange
- Contact support if persists
API Reference
Get Alert Configuration
GET /api/user/alert-config
Update Alert Configuration
PATCH /api/user/alert-config
Content-Type: application/json
{
"emailEnabled": true,
"telegramEnabled": true,
"telegramChatId": "123456789",
"maxAlertsPerHour": 20,
"throttleSeconds": 60
}
Get Alert Stats
GET /api/tradedroid/bots/{botId}/alerts/stats
Response:
{
"hourlyCount": 5,
"todayCount": 23,
"lastAlertAt": "2026-01-12T10:30:45Z"
}
Next Steps
- Risk Management - Configure risk alerts
- Creating Strategies - Add alerts to strategies
- Telegram Setup - Detailed Telegram guide
- Monitoring - Dashboard alerts