Khurram Badar / Archive / Papers / Titan Trader metalstradingdesk.com

Titan Trader metalstradingdesk.com

whitepaper · 2026-05-30 · 2161 words · Khurram Badar

Titan Trader — metalstradingdesk.com > Internal codebase name: titantrader. Product name shown to Rashid: metalstradingdesk.com.

ai · energy · finance · technology · real estate · legal

Titan Trader — metalstradingdesk.com

> Internal codebase name: `titan_trader`. Product name shown to Rashid: **metalstradingdesk.com**. Never mix these in anything user-facing.

START HERE (next session)

---

THE STANDING RULES (these are law — see ~/.claude/projects/-Users-khurramb/memory/feedback_*.md)

1. **Data integrity is the MOAT.** Every number AND every macro claim must be real, sourced, honest, never invented, never stale, never narrated beyond the data. If you can't prove it, don't state it. (`feedback_data_integrity_moat.md`)
2. **Zero tolerance for wrong prices.** A wrong price must never reach the screen — not for 30 seconds. Validate at write time. (the $3,332 gold incident — `feedback_price_zero_tolerance.md`)
3. **Remove wrong data, don't caveat it.** If something on screen is wrong/unvalidated, remove it first, explain second. A removed feature beats a wrong one. (`feedback_remove_dont_caveat.md`)
4. **Images are not numeric data.** Vision transposes digits. Verify every screenshot number against a programmatic source; screenshots are qualitative narrative only. (`feedback_images_not_data.md`)
5. **No bias in signals.** Report signal distribution alongside accuracy. Bear signals fail FDR — flag them LOW CONVICTION, never dress them up. (`feedback_no_bias_data_integrity.md`)
6. **Complete all tasks completely.** No half-fixes. Re-run the diagnostic that found the problem to prove it's gone. (`feedback_complete_all_tasks.md`)
7. **No easy branch.** Never take the lower-effort path that sacrifices correctness. Fix root causes; don't amputate features. (`feedback_no_easy_branch.md`)
8. **Always Playwright before deploy.** Run `test-full.mjs` after every frontend change. Never change `watchlistConfig.ts` symbol mappings without verifying the TV embed actually renders them. (`feedback_playwright_before_deploy.md`)
9. **TradingView-level quality, not MVPs.** Use embedded widgets over custom-built. (`feedback_tradingview_vision.md`, `feedback_tv_embed_lesson.md`)
10. **Check market hours first.** Never give a session brief without confirming markets are open. Weekend = closed. (the Saturday incident — `feedback_check_market_hours.md`)
11. **Never issue a directional signal during unstable geopolitics.** Active conflict + live negotiations = refuse the directional call or carry a prominent instability warning. (the $50 Iran-strike miss)
12. **Deployment UX:** prefer code-level fixes over making Khurram do multi-step dashboard config. Pre-validate before asking. (`feedback_deployment_ux.md`)

**Verify-before-ship gate (mandatory for frontend):** `npx next build` → `node test-full.mjs` → Khurram browser-check → only then deploy. Do not push to production and discover problems live.

---

What This Is

Target user — Rashid Ashraf

---

Current State (updated 2026-05-30, session "chart-fix")

LIVE

Chart architecture (DECIDED 2026-05-30 — do not retry COMEX)

21 Autonomous Agents (canonical numbering — grouped by type)

**Data Agents (1–10)**
1. Intermarket Signal Engine — 5-input voting (DXY, EUR/USD, US10Y, SPX, Trump). 30-min loop.
2. Session Engine — Shanghai/LME/COMEX detection + hourly OHLC + breakout signals.
3. COT Agent — CFTC SODA API, managed-money positioning (weekly). Every 4h.
4. Options Sentiment — GLD put/call ratio. Every 30m.
5. BLS Agent — CPI, NFP, PPI, unemployment + release calendar. Every 2h.
6. Fed/Warsh Agent — 12 FRED series, real yields, yield curve, FOMC calendar. Every 30m.
7. Trump PhD Agent — 6 dimensions (Truth Social + EOs + WH briefings + frequency + language + classification). Every 10m.
8. LME Warehouse Agent — copper/aluminium prices + gold correlation. Every 1h.
9. Shanghai Premium Agent — SGE premium vs COMEX via 518880.SS + USD/CNY. Every 30m.
10. Social Media Intelligence — X analysts + YouTube + Chinese media (Haiku sentiment). Every 4h.

**Technical Analysis Agents (11–14) — added 2026-05-30, commit c610834, built because Rashid asked**
11. Support & Resistance — `/api/ta/support-resistance` — 60/120-day swing H/L, ATR(14), S1–S3, R1–R3. Every 30m.
12. Oscillator Agent — `/api/ta/oscillators` — RSI(14), Stochastic %K/%D, MACD(12,26,9) + cross detection. Every 30m.
13. Moving Averages Agent — `/api/ta/moving-averages` — 20 EMA, 50/100/200 SMA, alignment, Golden/Death cross. Every 30m.
14. Technical Studies — `/api/ta/technical-studies` — Ichimoku Cloud, Heiken Ashi, Bollinger Bands(20,2). Every 30m.

**Infrastructure Agents (15–18)**
15. Health Monitor — silent failure detection + price-accuracy validator + auto-fix. Every 5m.
16. Diagnostics Agent — central nerve system; 24h rolling history, failure/fix logs.
17. COMEX Breakout Detector — hourly H/L. NOTE: only produces range positions, never fires BULLISH/BEARISH_BREAKOUT (needs intraday live price, not bar close). Display-only, CAP=0.
18. Trump v1 Poller — Truth Social, every 3m (legacy, feeds Trump PhD).

**Intelligence Agents (19–21)**
19. Signal Recorder + Learning Pipeline — Postgres. Records every signal + agent inputs, tracks 1h/4h/24h outcomes, 9 pattern rules.
20. Master Agent Chatbot — Haiku brain with all agent data + Rashid knowledge graph. Voice input (Web Speech API) + TTS.
21. Agent Orchestrator — meta-agent firing all data agents on schedule (background function in `api.py`, starts 20s after boot; not a registered agent entity).

Bearish FDR Disclosure (LIVE — 2026-05-28, commit c473b78)

Architecture

Market-data screenshot reflex

Key Technical Constraints

Key Files

Environment

Open Items / Next Steps (priority order)

Incident Log

← Technical trading desk engineering documentationSystem architecture visualization for fintech platforms →
Two years of working thought, indexed.
Ask me to present it in your conference room — WhatsApp +971 55 623 9111
Book Session →