# mlopsartisan/live_candlestickchart_mt5 architecture

> Architecture diagram of the GitHub repository mlopsartisan/live_candlestickchart_mt5, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mlopsartisan/live_candlestickchart_mt5
- Repository: https://github.com/mlopsartisan/live_candlestickchart_mt5

## Overview

This repository is a set of standalone cryptocurrency charting and trading prototypes rather than one integrated application. The main workflows are fetching market candles and rendering interactive charts, streaming Binance data into live charts, and submitting manual orders through MetaTrader 5. Some scripts also append market data to CSV files for later monitoring. The graph reflects sampled scripts; names in the tree suggest additional algorithm and backtracking experiments, but their behavior and wiring cannot be confirmed from the available source.

Main entry points: [`Little_change_for visulization_Via_Websocket.py`](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Little_change_for%20visulization_Via_Websocket.py) (Binance live chart), [`Final_Trading_Chart.py`](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py) (MT5 chart app), [`check.py`](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/check.py) (Quick order chart), [`print_price.py`](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/print_price.py) (Price CSV capture)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_charts["Market charts"]
  node_mt5chart["MT5 chart app"]
  node_mt5rates["MT5 candle rates"]
  node_chartview["Candlestick view"]
  node_binancechart["Binance live chart"]
  node_livebuffer["Live candle buffer"]
end

subgraph group_trading["Trade execution"]
  node_quicktrade["Quick order chart<br/>[check.py]"]
  node_manualtrade["Manual trade CLI<br/>[Sell_Order.py]"]
end

subgraph group_csv["CSV capture"]
  node_capture["Price CSV capture<br/>[print_price.py]"]
  node_tkcapture["Tkinter CSV chart"]
  node_pricecsv["Price data CSV<br/>[price_data.csv]"]
  node_datacsv["Chart data CSV<br/>[data.csv]"]
  node_monitor["CSV row monitor<br/>[monitor_csv.py]"]
end

node_user(("User"))
node_mt5["MetaTrader 5"]
node_binancerest["Binance REST API"]
node_binancews["Binance WebSocket"]

node_user -->|"selects timeframe"| node_mt5chart
node_mt5chart -->|"requests candles"| node_mt5rates
node_mt5rates -->|"fetches rates"| node_mt5
node_mt5chart -->|"renders chart"| node_chartview
node_user -->|"selects timeframe"| node_binancechart
node_binancechart -->|"loads history"| node_binancerest
node_binancechart -->|"opens stream"| node_binancews
node_binancews -->|"supplies candles"| node_livebuffer
node_binancechart -->|"plots candles"| node_livebuffer
node_user -->|"submits order"| node_quicktrade
node_quicktrade -->|"sends order"| node_mt5
node_quicktrade -->|"requests candles"| node_mt5
node_user -->|"chooses trade"| node_manualtrade
node_manualtrade -->|"sends or closes"| node_mt5
node_user -->|"selects timeframe"| node_capture
node_capture -->|"fetches rates"| node_mt5
node_capture -->|"appends candles"| node_pricecsv
node_user -->|"selects timeframe"| node_tkcapture
node_tkcapture -->|"fetches rates"| node_mt5
node_tkcapture -->|"appends candles"| node_datacsv
node_monitor -->|"reads latest row"| node_pricecsv

click node_mt5chart "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py"
click node_mt5rates "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py"
click node_chartview "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py"
click node_binancechart "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Little_change_for%20visulization_Via_Websocket.py"
click node_livebuffer "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Little_change_for%20visulization_Via_Websocket.py"
click node_quicktrade "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/check.py"
click node_manualtrade "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/UsingMT5_Order_sending/Sell_Order.py"
click node_capture "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/print_price.py"
click node_tkcapture "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/tkinter_plotchart_storedata_csv.py"
click node_pricecsv "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/price_data.csv"
click node_datacsv "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/data.csv"
click node_monitor "https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/monitor_csv.py"

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_mt5chart,node_mt5rates,node_chartview,node_binancechart,node_livebuffer,node_user toneBlue
class node_quicktrade,node_manualtrade toneAmber
class node_capture,node_tkcapture,node_pricecsv,node_datacsv,node_monitor,node_binancerest toneMint
class node_mt5,node_binancews toneIndigo
```

## Components

### Market charts

- [MT5 chart app](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py): `Final_Trading_Chart.py`
- [MT5 candle rates](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py): `Final_Trading_Chart.py`
- [Candlestick view](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Final_Trading_Chart.py): `Final_Trading_Chart.py`
- [Binance live chart](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Little_change_for%20visulization_Via_Websocket.py): `Little_change_for visulization_Via_Websocket.py`
- [Live candle buffer](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/Little_change_for%20visulization_Via_Websocket.py): `Little_change_for visulization_Via_Websocket.py`

### Trade execution

- [Quick order chart](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/check.py): `check.py`
- [Manual trade CLI](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/UsingMT5_Order_sending/Sell_Order.py): `UsingMT5_Order_sending/Sell_Order.py`

### CSV capture

- [Price CSV capture](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/print_price.py): `print_price.py`
- [Tkinter CSV chart](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/tkinter_plotchart_storedata_csv.py): `tkinter_plotchart_storedata_csv.py`
- [Price data CSV](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/price_data.csv): `price_data.csv`
- [Chart data CSV](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/data.csv): `data.csv`
- [CSV row monitor](https://github.com/mlopsartisan/live_candlestickchart_mt5/blob/master/monitor_csv.py): `monitor_csv.py`

### Other components

- **User**
- **MetaTrader 5**
- **Binance REST API**
- **Binance WebSocket**

## Connections

- User → MT5 chart app: selects timeframe
- MT5 chart app → MT5 candle rates: requests candles
- MT5 candle rates → MetaTrader 5: fetches rates
- MT5 chart app → Candlestick view: renders chart
- User → Binance live chart: selects timeframe
- Binance live chart → Binance REST API: loads history
- Binance live chart → Binance WebSocket: opens stream
- Binance WebSocket → Live candle buffer: supplies candles
- Binance live chart → Live candle buffer: plots candles
- User → Quick order chart: submits order
- Quick order chart → MetaTrader 5: sends order
- Quick order chart → MetaTrader 5: requests candles
- User → Manual trade CLI: chooses trade
- Manual trade CLI → MetaTrader 5: sends or closes
- User → Price CSV capture: selects timeframe
- Price CSV capture → MetaTrader 5: fetches rates
- Price CSV capture → Price data CSV: appends candles
- User → Tkinter CSV chart: selects timeframe
- Tkinter CSV chart → MetaTrader 5: fetches rates
- Tkinter CSV chart → Chart data CSV: appends candles
- CSV row monitor → Price data CSV: reads latest row
