# geo-free/deriv-accumulator-bot architecture

> Architecture diagram of the GitHub repository geo-free/deriv-accumulator-bot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/geo-free/deriv-accumulator-bot
- Repository: https://github.com/geo-free/deriv-accumulator-bot

## Overview

Deriv Bot Pro is intended to offer two separate trading products: Deriv options and MT5 trading. The sampled runtime evidence is narrower: `api/mt5-signal.js` handles MT5 bridge commands, heartbeats, and position data, while `api/economic-calendar.js` proxies calendar data from external providers. The README describes broader trading workflows and risk controls, but their implementation is not shown; those links are dashed. The UI and MT5 EA are present in the tree but were not sampled.

Main entry points: [`api/mt5-signal.js`](https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/mt5-signal.js) (MT5 signals and commands), [`index.html`](https://github.com/geo-free/deriv-accumulator-bot/blob/main/index.html) (Trading interface), [`mt5/DerivBotBridgeEA.mq5`](https://github.com/geo-free/deriv-accumulator-bot/blob/main/mt5/DerivBotBridgeEA.mq5) (MT5 bridge EA), [`api/economic-calendar.js`](https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/economic-calendar.js) (Calendar proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Product interface"]
  node_interface["Trading interface<br/>[index.html]"]
end

subgraph group_options["Options trading"]
  node_options_account["Deriv account link"]
  node_options_strategies["Options strategies"]
  node_options_risk["Options risk settings"]
  node_options_execution["Deriv options execution"]
end

subgraph group_mt5["MT5 trading"]
  node_mt5_setup["MT5 setup and modes"]
  node_mt5_signals["MT5 signals and commands<br/>[mt5-signal.js]"]
  node_mt5_bridge["MT5 bridge EA"]
  node_mt5_positions["MT5 positions<br/>[mt5-signal.js]"]
  node_mt5_risk["MT5 risk controls"]
end

subgraph group_support["Calendar and analysis"]
  node_calendar_proxy["Calendar proxy"]
  node_calendar_providers["Calendar providers"]
  node_analysis_llm["LLM analysis"]
end

node_trader(("Trader"))

node_trader -.->|"chooses product"| node_interface
node_interface -.->|"links account"| node_options_account
node_options_account -.->|"selects contract"| node_options_strategies
node_options_strategies -.->|"configures risk"| node_options_risk
node_options_risk -.->|"authorizes trade"| node_options_execution
node_interface -.->|"chooses mode"| node_mt5_setup
node_mt5_setup -.->|"sends commands"| node_mt5_signals
node_mt5_signals -.->|"exchanges commands"| node_mt5_bridge
node_mt5_bridge -.->|"reports positions"| node_mt5_signals
node_mt5_signals -->|"provides positions"| node_mt5_positions
node_mt5_setup -.->|"sets limits"| node_mt5_risk
node_mt5_risk -.->|"constrains execution"| node_mt5_signals
node_trader -.->|"requests calendar"| node_calendar_proxy
node_calendar_proxy -->|"fetches events"| node_calendar_providers
node_analysis_llm -.->|"explains signals"| node_mt5_signals

click node_interface "https://github.com/geo-free/deriv-accumulator-bot/blob/main/index.html"
click node_mt5_signals "https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/mt5-signal.js"
click node_mt5_bridge "https://github.com/geo-free/deriv-accumulator-bot/blob/main/mt5/DerivBotBridgeEA.mq5"
click node_mt5_positions "https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/mt5-signal.js"
click node_calendar_proxy "https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/economic-calendar.js"

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_interface toneBlue
class node_options_account,node_options_strategies,node_options_risk,node_options_execution toneAmber
class node_mt5_setup,node_mt5_signals,node_mt5_bridge,node_mt5_positions,node_mt5_risk toneMint
class node_calendar_proxy,node_calendar_providers,node_analysis_llm toneRose
class node_trader toneIndigo
```

## Components

### Product interface

- [Trading interface](https://github.com/geo-free/deriv-accumulator-bot/blob/main/index.html): `index.html`

### Options trading

- **Deriv account link**
- **Options strategies**
- **Options risk settings**
- **Deriv options execution**

### MT5 trading

- **MT5 setup and modes**
- [MT5 signals and commands](https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/mt5-signal.js): `api/mt5-signal.js`
- [MT5 bridge EA](https://github.com/geo-free/deriv-accumulator-bot/blob/main/mt5/DerivBotBridgeEA.mq5): `mt5/DerivBotBridgeEA.mq5`
- [MT5 positions](https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/mt5-signal.js): `api/mt5-signal.js`
- **MT5 risk controls**

### Calendar and analysis

- [Calendar proxy](https://github.com/geo-free/deriv-accumulator-bot/blob/main/api/economic-calendar.js): `api/economic-calendar.js`
- **Calendar providers**
- **LLM analysis**

### Other components

- **Trader**

## Connections

- Trader → Trading interface: chooses product (evidence: `README.md`)
- Trading interface → Deriv account link: links account (evidence: `README.md`)
- Deriv account link → Options strategies: selects contract (evidence: `README.md`)
- Options strategies → Options risk settings: configures risk (evidence: `README.md`)
- Options risk settings → Deriv options execution: authorizes trade (evidence: `README.md`)
- Trading interface → MT5 setup and modes: chooses mode (evidence: `README.md`)
- MT5 setup and modes → MT5 signals and commands: sends commands (evidence: `README.md`)
- MT5 signals and commands → MT5 bridge EA: exchanges commands (evidence: `README.md`)
- MT5 bridge EA → MT5 signals and commands: reports positions (evidence: `README.md`)
- MT5 signals and commands → MT5 positions: provides positions (evidence: `api/mt5-signal.js`)
- MT5 setup and modes → MT5 risk controls: sets limits (evidence: `README.md`)
- MT5 risk controls → MT5 signals and commands: constrains execution (evidence: `README.md`)
- Trader → Calendar proxy: requests calendar (evidence: `README.md`)
- Calendar proxy → Calendar providers: fetches events (evidence: `api/economic-calendar.js`)
- LLM analysis → MT5 signals and commands: explains signals (evidence: `README.md`)
