# oktovaaaaa/agent-ai-for-trade architecture

> Architecture diagram of the GitHub repository oktovaaaaa/agent-ai-for-trade, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/oktovaaaaa/agent-ai-for-trade
- Repository: https://github.com/oktovaaaaa/agent-ai-for-trade

## Overview

RallyGod Hunter is an Indonesian-stock scanner that finds TradingView Hunter candidates, checks chart signals across timeframes, classifies results, and produces reports and WhatsApp summaries. The main runtime is a single Python script; its excerpts show parallel browser workers and chart-data processing, while the README documents the broader screening, analysis, reporting, and scheduling features. The dashboard and some report-persistence details are represented from the repository tree and README; their implementation was not sampled, so those relationships are documented rather than inferred from source.

Main entry points: [`bot_hunter.py`](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py) (Report generation), [`docs/app.js`](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/app.js) (Screener dashboard), [`docs/index.html`](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/index.html) (Dashboard page), [`docs/data/history.json`](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/data/history.json) (Dashboard history)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scan["Scanning and analysis"]
  node_schedule["Daily schedule<br/>[bot_hunter.py]"]
  node_screener["Hunter screener<br/>[bot_hunter.py]"]
  node_scan_engine["Parallel scan engine<br/>[bot_hunter.py]"]
end

subgraph group_signals["Signal interpretation"]
  node_chart_analysis["Chart signal analysis<br/>[bot_hunter.py]"]
  node_smc_analysis["SMC structure analysis<br/>[bot_hunter.py]"]
  node_signal_categories["Signal categories<br/>[bot_hunter.py]"]
  node_technical_signals["Other technical signals<br/>[bot_hunter.py]"]
end

subgraph group_delivery["Reports and alerts"]
  node_report["Report generation<br/>[bot_hunter.py]"]
  node_report_files["Saved reports"]
  node_whatsapp["WhatsApp delivery<br/>[bot_hunter.py]"]
end

subgraph group_web["Web dashboard"]
  node_history[("Dashboard history<br/>[history.json]")]
  node_dashboard["Screener dashboard<br/>[app.js]"]
  node_dashboard_page["Dashboard page<br/>[index.html]"]
end

node_operator(("Operator"))
node_tradingview["TradingView"]
node_fonnte["Fonnte"]

node_operator -->|"starts scan"| node_schedule
node_schedule -->|"runs daily"| node_screener
node_screener -->|"selects stocks"| node_scan_engine
node_scan_engine -->|"opens chart data"| node_tradingview
node_scan_engine -->|"checks timeframes"| node_chart_analysis
node_chart_analysis -->|"counts green dots"| node_signal_categories
node_chart_analysis -->|"checks structure"| node_smc_analysis
node_chart_analysis -->|"detects signals"| node_technical_signals
node_signal_categories -->|"formats summary"| node_report
node_smc_analysis -->|"adds levels"| node_report
node_technical_signals -->|"adds signal details"| node_report
node_report -->|"saves report"| node_report_files
node_report -->|"sends summary"| node_whatsapp
node_whatsapp -->|"delivers via"| node_fonnte
node_dashboard -.->|"reads history"| node_history
node_dashboard_page -.->|"loads interface"| node_dashboard

click node_schedule "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_screener "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_scan_engine "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_chart_analysis "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_smc_analysis "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_signal_categories "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_technical_signals "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_report "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_whatsapp "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py"
click node_history "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/data/history.json"
click node_dashboard "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/app.js"
click node_dashboard_page "https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_schedule,node_screener,node_scan_engine,node_tradingview toneBlue
class node_chart_analysis,node_smc_analysis,node_signal_categories,node_technical_signals toneAmber
class node_report,node_report_files,node_whatsapp toneMint
class node_history,node_dashboard,node_dashboard_page toneRose
class node_operator,node_fonnte toneIndigo
```

## Components

### Scanning and analysis

- [Daily schedule](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`
- [Hunter screener](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`
- [Parallel scan engine](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`

### Signal interpretation

- [Chart signal analysis](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`
- [SMC structure analysis](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`
- [Signal categories](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`
- [Other technical signals](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`

### Reports and alerts

- [Report generation](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`
- **Saved reports**
- [WhatsApp delivery](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/bot_hunter.py): `bot_hunter.py`

### Web dashboard

- [Dashboard history](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/data/history.json): `docs/data/history.json`
- [Screener dashboard](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/app.js): `docs/app.js`
- [Dashboard page](https://github.com/oktovaaaaa/agent-ai-for-trade/blob/main/docs/index.html): `docs/index.html`

### Other components

- **Operator**
- **TradingView**
- **Fonnte**

## Connections

- Operator → Daily schedule: starts scan (evidence: `README.md`)
- Daily schedule → Hunter screener: runs daily (evidence: `README.md`)
- Hunter screener → Parallel scan engine: selects stocks (evidence: `README.md`)
- Parallel scan engine → TradingView: opens chart data (evidence: `bot_hunter.py`)
- Parallel scan engine → Chart signal analysis: checks timeframes (evidence: `bot_hunter.py`)
- Chart signal analysis → Signal categories: counts green dots (evidence: `bot_hunter.py`)
- Chart signal analysis → SMC structure analysis: checks structure (evidence: `README.md`)
- Chart signal analysis → Other technical signals: detects signals (evidence: `bot_hunter.py`)
- Signal categories → Report generation: formats summary (evidence: `README.md`)
- SMC structure analysis → Report generation: adds levels (evidence: `README.md`)
- Other technical signals → Report generation: adds signal details (evidence: `bot_hunter.py`)
- Report generation → Saved reports: saves report (evidence: `README.md`)
- Report generation → WhatsApp delivery: sends summary (evidence: `README.md`)
- WhatsApp delivery → Fonnte: delivers via (evidence: `README.md`)
- Screener dashboard → Dashboard history: reads history
- Dashboard page → Screener dashboard: loads interface
