How princeyadaviiit/dda-v2 works
DDA Agent is a signal-only forex and gold analysis system. Its principal workflow fetches TradingView market data, validates and normalizes it, runs six analytical agents, applies confluence and deterministic risk checks, then records signal/audit results and exposes them through the API, dashboard, and optional Telegram alerts. The graph preserves the documented analysis stages and major dashboard/health capabilities. Some internal calls and dashboard-to-API wiring are not shown in the excerpts, so those links are omitted or marked unverified.
Main entry points: orchestrator.py Scan Orchestrator · health_service.py Health Monitoring · routes.py REST API · repository.py Persistence Repository
Components 26
Market Inputs
- MCP Client
backend/adapters/mcp_stdio_client.py - TradingView Adapter
backend/adapters/tradingview_mcp_client.py - Market Normalizer
backend/adapters/normalizer.py
Analysis Pipeline
- Scan Orchestrator
backend/core/orchestrator.py - Scout Agent
backend/agents/scout.py - News Agent
backend/agents/news.py - Sentiment Agent
backend/agents/sentiment.py - Charts Agent
backend/agents/charts.py - Technical Structure
backend/indicators/structure.py - Decision Agent
backend/agents/decision.py - AI Reasoning Worker
backend/services/ai_reasoning_worker.py - Risk Agent
backend/agents/risk.py
Signals and Delivery
- Signal Validation
backend/services/signal_engine.py - Execution Safety Gate
backend/services/execution_gateway.py - Persistence Repository
backend/database/repository.py - SQLite Store
backend/database/db.py - Telegram Service
backend/services/telegram_service.py
API and Dashboard
- REST API
backend/api/routes.py - Live WebSocket
backend/api/websocket.py - Financial Dashboard
dashboard/src/app/page.tsx - Dashboard API Client
dashboard/src/lib/api.ts
Health and State
- Health Monitoring
backend/services/health_service.py - Pipeline State
backend/core/state_machine.py
Other components
- TradingView
- Telegram API
- Operator
Connections 31
- Scan Orchestrator → TradingView Adapter: fetches data
backend/core/orchestrator.py - TradingView Adapter → MCP Client: calls tools
backend/adapters/tradingview_mcp_client.py - MCP Client → TradingView: requests market data
README.md - Scan Orchestrator → Market Normalizer: normalizes data
backend/core/orchestrator.py - Scan Orchestrator → Scout Agent: runs analysis
README.md - Scan Orchestrator → News Agent: runs analysis
README.md - Scan Orchestrator → Sentiment Agent: runs analysis
README.md - Scan Orchestrator → Charts Agent: runs analysis
README.md - Charts Agent → Technical Structure: uses indicators
backend/agents/charts.py - Scan Orchestrator → Decision Agent: runs synthesis
README.md - Decision Agent → AI Reasoning Worker: delegates reasoning
backend/agents/decision.py - AI Reasoning Worker → Operator: requests synthesis
- Scan Orchestrator → Risk Agent: runs risk gate
README.md - Scan Orchestrator → Signal Validation: validates confluence
README.md - Scan Orchestrator → Persistence Repository: stores scan results
backend/core/orchestrator.py - Signal Validation → Persistence Repository: records signals
- Persistence Repository → SQLite Store: reads and writes
backend/database/repository.py - Telegram Service → Telegram API: sends alerts
backend/services/telegram_service.py - Scan Orchestrator → Telegram Service: dispatches signals
- Execution Safety Gate → Operator: blocks orders
README.md - Operator → Financial Dashboard: views terminal
README.md - Financial Dashboard → Dashboard API Client: requests data
- Dashboard API Client → REST API: calls backend
- REST API → Persistence Repository: queries records
backend/api/routes.py - REST API → Health Monitoring: probes health
backend/api/routes.py - REST API → Live WebSocket: streams updates
backend/api/routes.py - Scan Orchestrator → Pipeline State: updates pipeline
backend/core/orchestrator.py - Health Monitoring → TradingView Adapter: probes connection
backend/services/health_service.py - Health Monitoring → AI Reasoning Worker: probes engine
backend/services/health_service.py - Health Monitoring → Telegram Service: checks status
backend/services/health_service.py - Health Monitoring → Execution Safety Gate: checks mode
backend/services/health_service.py