Salta ai contenuti

/notifications

Cosa fa. Riepiloga gli alert attivi oppure l’intero storico delle notifiche.

Quando usarlo. Per rivedere cosa è scattato.

Argomenti. TICKER | history (optional)

Esempio. /notifications history

Cosa restituisce. Lo stato degli alert attivi o la cronologia delle notifiche.

Quando lanci /notifications, Dexter non esegue codice fisso: invia all’AI la prompt qui sotto — il segnaposto {arg} viene sostituito con ciò che scrivi dopo il comando — e l’agente la esegue chiamando da sé gli strumenti necessari. Vedi Come funzionano i comandi per le convenzioni comuni (chiamate in parallelo, anti-allucinazione, fasi, widget di chiusura).

Strumenti che può usare: get_user_notifications, get_crypto_snapshot, get_stock_performance, get_technical_indicators, get_future_profile, get_stock_prices_intraday, get_fund_profile, get_crypto_prices, get_crypto_prices_intraday, get_crypto_technical_indicators, get_key_ratios, get_company_news, get_crypto_metadata, web_search, get_stock_prices, get_income_statements.

È la prompt esatta inviata all’AI quando usi il comando (sostituendo {arg}).

/notifications arg: "{arg}"
--- PARSE ---
Determine ticker and history mode from "{arg}":
- Contains "history": history=true. If ticker before "history" → ticker=that_ticker.
- Is a ticker (1-5 uppercase letters, possibly .DE/.MI): ticker=that_ticker, history=false.
- Empty or "{arg}": ticker=none, history=false (MODE 1: ALL_ACTIVE).
--- 4 MODES ---
## MODE 1: /notifications (no ticker, no history) — ACTIVE alerts, quick overview
If ticker=none AND history=false:
1. get_user_notifications(limit=100, unread_only=false)
2. Filter for alert_is_active=true. Group by ticker. For each: condition type, trigger vs threshold, message, timestamp.
3. If expired/consumed notifications exist, compact line "X additional expired notifications" at bottom (no details).
4. If zero active alerts: "No active alerts." and suggest /set-alert TICKER.
## MODE 2: /notifications TICKER (no history) — ACTIVE alerts for ONE ticker, DEEP analysis
If ticker present AND history=false:
1. get_user_notifications(limit=100, unread_only=false) → filter by ticker + alert_is_active=true.
2. If zero active alerts for this ticker: state it, but proceed with analysis (step 3).
3. Detect asset type — in order:
- IS_FUTURE: ticker ends with "=F" (GC=F, CL=F, ES=F, ZN=F, etc.)
- IS_FOREX: ticker ends with "=X" (EURUSD=X, GBPUSD=X, etc.)
- IS_FUND: known mutual fund tickers (VFIAX, FXAIX, VTSAX, VBTLX, FZROX, PRGFX, VTIAX, VEIRX)
- IS_INDEX: ticker starts with "^" (^GSPC, ^IXIC, ^DJI, etc.)
- IS_CRYPTO: obvious crypto symbol (BTC, ETH, SOL, BNB, XRP, ADA, DOGE, AVAX, etc.)
or try get_crypto_snapshot(symbol=ticker) — if it returns price data → IS_CRYPTO=true
- IS_STOCK/ETF: everything else
IN PARALLEL:
IF IS_FUTURE: get_stock_performance, get_technical_indicators(limit=3), get_future_profile,
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_FOREX: get_stock_performance, get_technical_indicators(limit=3),
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_FUND: get_stock_performance, get_fund_profile,
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_INDEX: get_stock_performance, get_technical_indicators(limit=3),
get_stock_prices_intraday(interval="1h", limit=16)
IF IS_CRYPTO: get_crypto_snapshot, get_crypto_prices(interval="day", limit=30),
get_crypto_prices_intraday(interval="1h", limit=24), get_crypto_technical_indicators
IF IS_STOCK/ETF: get_stock_performance, get_technical_indicators(limit=3), get_key_ratios,
get_company_news, get_stock_prices_intraday(interval="1h", limit=16)
4. For EACH active alert, cross-reference with current data:
- What does the condition mean in current context? Current value distance from threshold?
- Use intraday hourly bars to assess: is price trending toward or away from the threshold? Estimated time to trigger at current pace?
- Is the alert aligned with technicals? (e.g. PRICE_ABOVE + RSI overbought = coherent)
- Recently triggered alert (<24h): false alarm or valid signal?
5. Synthesis: what story do these alerts collectively tell? Clusters around a specific thesis (breakout, breakdown, range-bound, reversal)?
6. Output:
### {TICKER} — Active Alerts
[Price, RSI, MACD, vs SMA20/50, 52w position — max 2 lines]
🔴/🟡/🟢 **{condition}**: trigger at {threshold} vs current {value} → [1-line assessment]
### Synthesis
[2-3 sentences: what alerts suggest, opportunity or risk, what to watch]
### Recommendations
[1-2 actionable suggestions: modify thresholds? new alerts? critical price levels?]
## MODE 3: /notifications history (no ticker) — ALL notifications
If ticker=none AND history=true:
1. get_user_notifications(limit=200, unread_only=false)
2. Split: 🟢 ACTIVE (alert_is_active=true) vs ⚫ EXPIRED (alert_is_active=false or notify_once consumed).
Group by ticker. For each notification: condition, trigger vs threshold, timestamp.
3. Pattern analysis:
- Alert frequency per ticker | Most frequent condition types
- Clusters: multiple alerts on same ticker in short windows?
- Prone to false positives (trigger then price moves opposite)
4. If "{arg}" contains extra instructions beyond "history", follow them (e.g. "history RSI only" → filter).
5. Output:
### Notifications Overview
Total: X (Y active, Z expired) | Tickers: N
### Active Alerts
| Ticker | Condition | Threshold | Current | Since |
### Recent History (30 days)
| Ticker | Condition | Triggered At | Status |
### Patterns & Insights
[Frequency, trigger types, clusters, false positives]
### Recommendations
[Threshold adjustments, tickers to watch, alerts to disable if too noisy]
## MODE 4: /notifications TICKER history — ALL alerts for ONE ticker, DEEP patterns
If ticker present AND history=true:
1. get_user_notifications(limit=200, unread_only=false) → filter ticker. Keep ALL (active + expired). Sort chronologically.
2. Detect asset type (same logic as MODE 2).
IN PARALLEL:
IF IS_CRYPTO: get_crypto_prices(interval="day", limit=180), get_crypto_prices_intraday(interval="1h", limit=48),
get_crypto_snapshot, get_crypto_technical_indicators, get_crypto_metadata,
web_search("latest news {TICKER} crypto")
IF IS_STOCK: get_stock_prices(interval="day", 6 months), get_stock_prices_intraday(interval="1h", limit=48),
get_stock_performance, get_technical_indicators(limit=5), get_key_ratios,
get_company_news, get_income_statements(quarterly, limit=4)
3. Timeline:
- List each alert by date, condition, trigger. Alert clusters within 1-2 days = "signal cluster".
- Overlay price at each alert date.
4. Pattern detection:
- Which conditions consistently precede price moves?
- Which alerts were "correct" vs "false signals"?
- Recurring sequences? Average lead time between alert and price move?
- Current alerts vs similar historical patterns: has this combination happened before? What followed?
5. Output:
### {TICKER} — Alert History
[Current state: price, RSI, MACD, SMA, 52w — 1 line]
### Alert Timeline
| Date | Condition | Trigger | Price | Outcome |
(✅ correct / ❌ false / ⏳ pending)
### Signal Clusters
[2-4 clusters. Each: dates, alerts involved, what happened next]
### Pattern Analysis
- Most reliable alert for {TICKER}: [type + hit rate] | Least reliable: [type]
- Typical cadence: [frequency, cyclical patterns] | Recurring sequence: [if found]
### Active Alerts — Historical Context
[For each active alert, find most similar historical instance and report outcome]
### Strategic Recommendations
[Modify thresholds? Which alert types work best? Historically critical levels?]
--- GENERAL RULES ---
- Always separate ACTIVE from EXPIRED.
- If get_user_notifications is empty or fails: state it and stop.
- Respond in user's language. Frame everything as "things to watch" not buy/sell recommendations.