# kefotrade26-maker/myproject-ko-ro-4i-2 architecture

> Architecture diagram of the GitHub repository kefotrade26-maker/myproject-ko-ro-4i-2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kefotrade26-maker/myproject-ko-ro-4i-2
- Repository: https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2

## Overview

KoveerBridge streams Pocket Option candles into MT4-compatible CSV/HST data, while a multi-asset dashboard exposes bridge health, charts, and SMC zones. The main workflow is session extraction → Pocket Option WebSocket → per-asset processing → MT4 files; backfill and chart recovery provide separate historical-data paths. Edges reflect shown calls or explicit source-index references. The README is empty, and unsampled EA/indicator behavior is not inferred.

Main entry points: [`multi_runner_2.py`](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/multi_runner_2.py) (Multi-asset runner), [`chart_api.py`](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/chart_api.py) (Chart and zones API), [`po_auth.py`](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/po_auth.py) (Session extraction), [`po_client.py`](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/po_client.py) (WebSocket client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_session_stream["Session and stream"]
  node_auth["Session extraction<br/>[po_auth.py]"]
  node_po_client["WebSocket client<br/>[po_client.py]"]
end

subgraph group_bridge_data["Bridge and data"]
  node_multi_runner["Multi-asset runner<br/>[multi_runner_2.py]"]
  node_runner_helpers["Time and file helpers<br/>[main_runner.py]"]
  node_mt4_files[("MT4 candle files")]
  node_active_assets["Active asset controls<br/>[active_assets.txt]"]
  node_telemetry["Bridge telemetry"]
end

subgraph group_history_tools["History maintenance"]
  node_backfill["Candle backfill<br/>[candle_backfill.py]"]
  node_quality["Coverage reports<br/>[bridge_quality.py]"]
end

subgraph group_web_experience["Dashboard and charts"]
  node_chart_api["Chart and zones API<br/>[chart_api.py]"]
  node_zones["Zone data loader<br/>[zones_api.py]"]
  node_dashboard["Dashboard server"]
  node_chart_server["Chart server wrapper"]
  node_chart_page["Chart page<br/>[chart.html]"]
end

subgraph group_mt4_product["MT4 integration"]
  node_mt4_ea["Koveer EA<br/>[KoveerEa.mq4]"]
  node_zone_indicator["SMC indicator"]
end

node_operator(("Operator"))
node_pocket_option(("Pocket Option"))

node_operator -->|"provides session"| node_auth
node_auth -->|"supplies credentials"| node_po_client
node_operator -.->|"starts bridge"| node_multi_runner
node_multi_runner -->|"loads session"| node_auth
node_multi_runner -->|"connects and subscribes"| node_po_client
node_po_client -.->|"streams candles"| node_pocket_option
node_multi_runner -->|"uses file and time helpers"| node_runner_helpers
node_multi_runner -->|"writes candle files"| node_mt4_files
node_multi_runner -->|"reads targets"| node_active_assets
node_multi_runner -->|"writes status"| node_telemetry
node_backfill -->|"extracts session"| node_auth
node_backfill -->|"fetches candles"| node_po_client
node_backfill -.->|"repairs CSV history"| node_mt4_files
node_quality -->|"checks coverage"| node_mt4_files
node_chart_server -->|"registers blueprint"| node_dashboard
node_chart_server -->|"registers routes"| node_chart_api
node_operator -.->|"opens dashboard"| node_chart_server
node_chart_api -->|"reads candle CSV"| node_mt4_files
node_chart_api -->|"recovers chart history"| node_auth
node_chart_api -->|"fetches recovery candles"| node_po_client
node_chart_api -->|"loads zone records"| node_zones
node_chart_page -.->|"requests chart data"| node_chart_api
node_dashboard -->|"reads bridge status"| node_telemetry
node_dashboard -->|"manages asset controls"| node_active_assets

click node_auth "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/po_auth.py"
click node_po_client "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/po_client.py"
click node_multi_runner "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/multi_runner_2.py"
click node_runner_helpers "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/main_runner.py"
click node_mt4_files "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/tree/main/MQL4/Files"
click node_active_assets "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/MQL4/Files/active_assets.txt"
click node_telemetry "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/MQL4/Files/bridge_telemetry.json"
click node_backfill "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/candle_backfill.py"
click node_quality "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/bridge_quality.py"
click node_chart_api "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/chart_api.py"
click node_zones "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/zones_api.py"
click node_dashboard "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/dashboard_server_2.py"
click node_chart_server "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/dashboard_with_chart.py"
click node_chart_page "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/chart.html"
click node_mt4_ea "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/Experts/KoveerEa.mq4"
click node_zone_indicator "https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/Indicators/KOVEER%2014%20PM%20-%20HTF%20-%20SMC.mq4"

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_auth,node_po_client toneBlue
class node_multi_runner,node_runner_helpers,node_mt4_files,node_active_assets,node_telemetry toneAmber
class node_backfill,node_quality toneMint
class node_chart_api,node_zones,node_dashboard,node_chart_server,node_chart_page toneRose
class node_mt4_ea,node_zone_indicator,node_operator,node_pocket_option toneIndigo
```

## Components

### Session and stream

- [Session extraction](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/po_auth.py): `po_auth.py`
- [WebSocket client](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/po_client.py): `po_client.py`

### Bridge and data

- [Multi-asset runner](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/multi_runner_2.py): `multi_runner_2.py`
- [Time and file helpers](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/main_runner.py): `main_runner.py`
- [MT4 candle files](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/tree/main/MQL4/Files): `MQL4/Files`
- [Active asset controls](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/MQL4/Files/active_assets.txt): `MQL4/Files/active_assets.txt`
- [Bridge telemetry](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/MQL4/Files/bridge_telemetry.json): `MQL4/Files/bridge_telemetry.json`

### History maintenance

- [Candle backfill](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/candle_backfill.py): `candle_backfill.py`
- [Coverage reports](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/bridge_quality.py): `bridge_quality.py`

### Dashboard and charts

- [Chart and zones API](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/chart_api.py): `chart_api.py`
- [Zone data loader](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/zones_api.py): `zones_api.py`
- [Dashboard server](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/dashboard_server_2.py): `dashboard_server_2.py`
- [Chart server wrapper](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/dashboard_with_chart.py): `dashboard_with_chart.py`
- [Chart page](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/chart.html): `chart.html`

### MT4 integration

- [Koveer EA](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/Experts/KoveerEa.mq4): `Experts/KoveerEa.mq4`
- [SMC indicator](https://github.com/kefotrade26-maker/myproject-ko-ro-4i-2/blob/main/Indicators/KOVEER%2014%20PM%20-%20HTF%20-%20SMC.mq4): `Indicators/KOVEER 14 PM - HTF - SMC.mq4`

### Other components

- **Operator**
- **Pocket Option**

## Connections

- Operator → Session extraction: provides session (evidence: `po_auth.py`)
- Session extraction → WebSocket client: supplies credentials (evidence: `candle_backfill.py`)
- Operator → Multi-asset runner: starts bridge
- Multi-asset runner → Session extraction: loads session (evidence: `multi_runner_2.py`)
- Multi-asset runner → WebSocket client: connects and subscribes (evidence: `multi_runner_2.py`)
- WebSocket client → Pocket Option: streams candles (evidence: `po_client.py`)
- Multi-asset runner → Time and file helpers: uses file and time helpers (evidence: `multi_runner_2.py`)
- Multi-asset runner → MT4 candle files: writes candle files
- Multi-asset runner → Active asset controls: reads targets (evidence: `multi_runner_2.py`)
- Multi-asset runner → Bridge telemetry: writes status (evidence: `multi_runner_2.py`)
- Candle backfill → Session extraction: extracts session (evidence: `candle_backfill.py`)
- Candle backfill → WebSocket client: fetches candles (evidence: `candle_backfill.py`)
- Candle backfill → MT4 candle files: repairs CSV history
- Coverage reports → MT4 candle files: checks coverage (evidence: `bridge_quality.py`)
- Chart server wrapper → Dashboard server: registers blueprint (evidence: `dashboard_with_chart.py`)
- Chart server wrapper → Chart and zones API: registers routes (evidence: `dashboard_with_chart.py`)
- Operator → Chart server wrapper: opens dashboard
- Chart and zones API → MT4 candle files: reads candle CSV (evidence: `chart_api.py`)
- Chart and zones API → Session extraction: recovers chart history (evidence: `chart_api.py`)
- Chart and zones API → WebSocket client: fetches recovery candles (evidence: `chart_api.py`)
- Chart and zones API → Zone data loader: loads zone records (evidence: `chart_api.py`)
- Chart page → Chart and zones API: requests chart data
- Dashboard server → Bridge telemetry: reads bridge status (evidence: `dashboard_server_2.py`)
- Dashboard server → Active asset controls: manages asset controls (evidence: `dashboard_server_2.py`)
