# mtraldi/memecoin architecture

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

- Interactive diagram: https://gitdiagram.com/mtraldi/memecoin
- Repository: https://github.com/mtraldi/memecoin

## Overview

The repository contains a Streamlit XAUUSD scalping terminal and a separate Pine Script indicator. The terminal workflow is visible in the sampled Python source; the Pine indicator’s implementation and the project’s PRD files were not sampled, so its behavior and integrations are left unspecified.

Main entry points: [`xauusd_terminal.py`](https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py) (Scalp Analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_terminal["Scalping Terminal"]
  node_terminal_ui["Terminal UI<br/>[xauusd_terminal.py]"]
end

subgraph group_analysis["Signal Analysis"]
  node_scalp_analysis["Scalp Analysis<br/>[xauusd_terminal.py]"]
  node_price_fetch["Gold Price Fetch<br/>[xauusd_terminal.py]"]
  node_fib_levels["Fibonacci Levels<br/>[xauusd_terminal.py]"]
  node_signal_checks["Signal Checks<br/>[xauusd_terminal.py]"]
end

subgraph group_indicator["Trading Indicator"]
  node_pine_indicator["SMC MTF Indicator"]
end

node_trader(("Trader"))
node_gold_api["Gold Price API"]

node_trader -->|"runs analysis"| node_terminal_ui
node_terminal_ui -->|"invokes"| node_scalp_analysis
node_scalp_analysis -->|"requests price"| node_price_fetch
node_price_fetch -->|"fetches quote"| node_gold_api
node_scalp_analysis -->|"calculates levels"| node_fib_levels
node_scalp_analysis -->|"evaluates setup"| node_signal_checks
node_scalp_analysis -->|"renders results"| node_terminal_ui

click node_terminal_ui "https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py"
click node_scalp_analysis "https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py"
click node_price_fetch "https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py"
click node_fib_levels "https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py"
click node_signal_checks "https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py"
click node_pine_indicator "https://github.com/mtraldi/memecoin/blob/main/smc-mtf/src/smc_mtf_indicator.pine"

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_terminal_ui toneBlue
class node_scalp_analysis,node_price_fetch,node_fib_levels,node_signal_checks toneAmber
class node_pine_indicator,node_gold_api toneMint
class node_trader toneIndigo
```

## Components

### Scalping Terminal

- [Terminal UI](https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py): `xauusd_terminal.py`

### Signal Analysis

- [Scalp Analysis](https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py): `xauusd_terminal.py`
- [Gold Price Fetch](https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py): `xauusd_terminal.py`
- [Fibonacci Levels](https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py): `xauusd_terminal.py`
- [Signal Checks](https://github.com/mtraldi/memecoin/blob/main/xauusd_terminal.py): `xauusd_terminal.py`

### Trading Indicator

- [SMC MTF Indicator](https://github.com/mtraldi/memecoin/blob/main/smc-mtf/src/smc_mtf_indicator.pine): `smc-mtf/src/smc_mtf_indicator.pine`

### Other components

- **Trader**
- **Gold Price API**

## Connections

- Trader → Terminal UI: runs analysis
- Terminal UI → Scalp Analysis: invokes
- Scalp Analysis → Gold Price Fetch: requests price
- Gold Price Fetch → Gold Price API: fetches quote
- Scalp Analysis → Fibonacci Levels: calculates levels
- Scalp Analysis → Signal Checks: evaluates setup
- Scalp Analysis → Terminal UI: renders results
