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

AlertDescriptionDefault
Trade EntryPosition opened✓ Enabled
Trade ExitPosition closed✓ Enabled
Order FilledOrder executed✓ Enabled
Order CancelledOrder cancelledOptional

Risk Alerts

AlertDescriptionTrigger
Risk limit reached: no new tradesThe bot stops opening trades and keeps managing its open positionOne of the bot's risk limits is reached
Risk limit lifted: trading resumedThe bot may open trades againThe 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 closedPause once flat is on and the position closes after a limit was reached
Exposure cap reached: new trades refusedNo new position opens on that exchange accountThe 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

AlertDescription
Connection ErrorExchange disconnected
Strategy ErrorStrategy execution failed
Balance WarningLow balance detected

Setting Up Alerts

1. Access Notification Settings

  1. Navigate to Settings → Notifications
  2. Or click the bell icon in the top navigation

2. Connect Email

Email alerts are enabled by default using your account email.

To change:

  1. Go to Settings → Account
  2. Update your email address
  3. Verify the new email

3. Connect Telegram

For instant mobile notifications:

  1. Start the Bot: Message @TradeStaqBot on Telegram
  2. Get Your Chat ID: Send /start to receive your Chat ID
  3. Enter Chat ID: Paste in Settings → Notifications → Telegram Chat ID
  4. 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
}
SettingDescriptionDefault
maxAlertsPerHourMaximum alerts per hour20
throttleSecondsSeconds between same alerts60
emailEnabledSend email alertstrue
telegramEnabledSend Telegram alertsfalse

Alert Levels

Alerts have different severity levels:

LevelIconUse CaseThrottling
Infoℹ️General informationStandard
Warning⚠️Potential issuesStandard
Error❌Critical problemsBypass
Trade Entry🟢Position openedStandard
Trade Exit🔴Position closedStandard

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

  1. Same Alert Throttle: Same alert title won't repeat for X seconds
  2. Hourly Limit: Maximum alerts per hour per bot
  3. 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

Email

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

  1. Check spam/junk folder
  2. Add noreply@tradestaq.com to contacts
  3. Verify email in Settings → Account
  4. Check alert preferences are enabled

Not Receiving Telegram Alerts

  1. Verify Chat ID is correct
  2. Send /start to @TradeStaqBot again
  3. Check Telegram notifications are on
  4. Test with "Send Test Message" button

Too Many Alerts

  1. Increase throttleSeconds
  2. Reduce maxAlertsPerHour
  3. Disable info-level alerts
  4. Review strategy alert logic

Alerts Delayed

  1. Email delivery can take 1-5 minutes
  2. Telegram should be instant
  3. Check TradeStaq status page
  4. High load may cause delays

Duplicate Alerts

  1. Check throttle settings
  2. Review strategy for duplicate calls
  3. Ensure only one bot per exchange
  4. 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