# cpetayammichaeljoshua-cyber/scalpingbot architecture

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

- Interactive diagram: https://gitdiagram.com/cpetayammichaeljoshua-cyber/scalpingbot
- Repository: https://github.com/cpetayammichaeljoshua-cyber/scalpingbot

## Overview

SignalMaestro is a cryptocurrency trading system with market analysis, strategy signals, risk controls, exchange trading, and backtesting capabilities. The clearest evidenced live-analysis path fetches a market snapshot and coordinates analyzers into market intelligence; the fusion engine combines intelligence with Ichimoku signals. The backtesting CLI coordinates signal generation, simulated execution, risk, leverage, and metrics. The tree also shows AI, Telegram/webhook, and trading integrations, but their runtime connections are not established by the sampled excerpts, so they are shown as capabilities without invented edges.

Main entry points: [`SignalMaestro/market_intelligence_engine.py`](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/market_intelligence_engine.py) (Market intelligence), [`SignalMaestro/backtester/cli.py`](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/cli.py) (Backtest orchestration), [`SignalMaestro/signal_fusion_engine.py`](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/signal_fusion_engine.py) (Signal fusion), [`SignalMaestro/async_market_data_fetcher.py`](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/async_market_data_fetcher.py) (Market data fetcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Market analysis"]
  node_fetcher["Market data fetcher"]
  node_contracts["Market data contracts"]
  node_intel["Market intelligence"]
  node_liquidity["Liquidity analysis"]
  node_orderflow["Order flow analysis"]
  node_priceaction["Price action analysis"]
  node_volumeprofile["Volume profile"]
  node_fractals["Fractal analysis"]
  node_intermarket["Intermarket analysis"]
end

subgraph group_strategy["Signals and trading"]
  node_ichimoku["Ichimoku strategy"]
  node_fusion["Signal fusion"]
  node_position["Position management"]
  node_riskmanager["Trading risk manager<br/>[risk_manager.py]"]
  node_traderfx["FXSUSDT trader<br/>[fxsusdt_trader.py]"]
  node_ai["AI orchestration<br/>[ai_orchestrator.py]"]
end

subgraph group_backtest["Backtesting"]
  node_backcli["Backtest orchestration<br/>[cli.py]"]
  node_btdata["Historical data<br/>[data.py]"]
  node_btsignals["Backtest signals<br/>[signals.py]"]
  node_btrisk["Backtest risk<br/>[risk.py]"]
  node_btleverage["Backtest leverage<br/>[leverage.py]"]
  node_btexec["Execution simulator<br/>[exec.py]"]
  node_btmetrics["Backtest metrics<br/>[metrics.py]"]
end

subgraph group_integrations["External interfaces"]
  node_exchange{{"Trading exchange"}}
  node_telegram{{"Telegram"}}
  node_webhooks["Webhook interface<br/>[webhook_server.py]"]
end

node_trader(("Trader"))

node_intel -->|"fetches snapshot"| node_fetcher
node_intel -->|"runs analyzer"| node_liquidity
node_intel -->|"runs analyzer"| node_orderflow
node_intel -->|"runs analyzer"| node_volumeprofile
node_intel -->|"runs analyzer"| node_fractals
node_intel -->|"runs analyzer"| node_intermarket
node_fusion -->|"uses strategy signal"| node_ichimoku
node_fusion -->|"uses intelligence"| node_intel
node_backcli -->|"loads data"| node_btdata
node_backcli -->|"generates signals"| node_btsignals
node_backcli -->|"calculates leverage"| node_btleverage
node_backcli -->|"manages risk"| node_btrisk
node_backcli -->|"simulates execution"| node_btexec
node_backcli -->|"reports metrics"| node_btmetrics

click node_fetcher "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/async_market_data_fetcher.py"
click node_contracts "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/market_data_contracts.py"
click node_intel "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/market_intelligence_engine.py"
click node_liquidity "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/advanced_liquidity_analyzer.py"
click node_orderflow "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/advanced_order_flow_analyzer.py"
click node_priceaction "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/advanced_price_action_analyzer.py"
click node_volumeprofile "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/volume_profile_analyzer.py"
click node_fractals "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/fractals_analyzer.py"
click node_intermarket "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/intermarket_analyzer.py"
click node_ichimoku "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/ichimoku_sniper_strategy.py"
click node_fusion "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/signal_fusion_engine.py"
click node_position "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/dynamic_position_manager.py"
click node_riskmanager "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/risk_manager.py"
click node_traderfx "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/fxsusdt_trader.py"
click node_ai "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/ai_orchestrator.py"
click node_backcli "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/cli.py"
click node_btdata "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/data.py"
click node_btsignals "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/signals.py"
click node_btrisk "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/risk.py"
click node_btleverage "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/leverage.py"
click node_btexec "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/exec.py"
click node_btmetrics "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/metrics.py"
click node_webhooks "https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/webhook_server.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_fetcher,node_contracts,node_intel,node_liquidity,node_orderflow,node_priceaction,node_volumeprofile,node_fractals,node_intermarket toneBlue
class node_ichimoku,node_fusion,node_position,node_riskmanager,node_traderfx,node_ai toneAmber
class node_backcli,node_btdata,node_btsignals,node_btrisk,node_btleverage,node_btexec,node_btmetrics toneMint
class node_exchange,node_telegram,node_webhooks toneRose
class node_trader toneIndigo
```

## Components

### Market analysis

- [Market data fetcher](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/async_market_data_fetcher.py): `SignalMaestro/async_market_data_fetcher.py`
- [Market data contracts](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/market_data_contracts.py): `SignalMaestro/market_data_contracts.py`
- [Market intelligence](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/market_intelligence_engine.py): `SignalMaestro/market_intelligence_engine.py`
- [Liquidity analysis](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/advanced_liquidity_analyzer.py): `SignalMaestro/advanced_liquidity_analyzer.py`
- [Order flow analysis](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/advanced_order_flow_analyzer.py): `SignalMaestro/advanced_order_flow_analyzer.py`
- [Price action analysis](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/advanced_price_action_analyzer.py): `SignalMaestro/advanced_price_action_analyzer.py`
- [Volume profile](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/volume_profile_analyzer.py): `SignalMaestro/volume_profile_analyzer.py`
- [Fractal analysis](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/fractals_analyzer.py): `SignalMaestro/fractals_analyzer.py`
- [Intermarket analysis](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/intermarket_analyzer.py): `SignalMaestro/intermarket_analyzer.py`

### Signals and trading

- [Ichimoku strategy](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/ichimoku_sniper_strategy.py): `SignalMaestro/ichimoku_sniper_strategy.py`
- [Signal fusion](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/signal_fusion_engine.py): `SignalMaestro/signal_fusion_engine.py`
- [Position management](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/dynamic_position_manager.py): `SignalMaestro/dynamic_position_manager.py`
- [Trading risk manager](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/risk_manager.py): `SignalMaestro/risk_manager.py`
- [FXSUSDT trader](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/fxsusdt_trader.py): `SignalMaestro/fxsusdt_trader.py`
- [AI orchestration](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/ai_orchestrator.py): `SignalMaestro/ai_orchestrator.py`

### Backtesting

- [Backtest orchestration](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/cli.py): `SignalMaestro/backtester/cli.py`
- [Historical data](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/data.py): `SignalMaestro/backtester/data.py`
- [Backtest signals](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/signals.py): `SignalMaestro/backtester/signals.py`
- [Backtest risk](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/risk.py): `SignalMaestro/backtester/risk.py`
- [Backtest leverage](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/leverage.py): `SignalMaestro/backtester/leverage.py`
- [Execution simulator](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/exec.py): `SignalMaestro/backtester/exec.py`
- [Backtest metrics](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/backtester/metrics.py): `SignalMaestro/backtester/metrics.py`

### External interfaces

- **Trading exchange**
- **Telegram**
- [Webhook interface](https://github.com/cpetayammichaeljoshua-cyber/scalpingbot/blob/main/SignalMaestro/webhook_server.py): `SignalMaestro/webhook_server.py`

### Other components

- **Trader**

## Connections

- Market intelligence → Market data fetcher: fetches snapshot (evidence: `SignalMaestro/market_intelligence_engine.py`)
- Market intelligence → Liquidity analysis: runs analyzer (evidence: `SignalMaestro/market_intelligence_engine.py`)
- Market intelligence → Order flow analysis: runs analyzer (evidence: `SignalMaestro/market_intelligence_engine.py`)
- Market intelligence → Volume profile: runs analyzer (evidence: `SignalMaestro/market_intelligence_engine.py`)
- Market intelligence → Fractal analysis: runs analyzer (evidence: `SignalMaestro/market_intelligence_engine.py`)
- Market intelligence → Intermarket analysis: runs analyzer (evidence: `SignalMaestro/market_intelligence_engine.py`)
- Signal fusion → Ichimoku strategy: uses strategy signal (evidence: `SignalMaestro/signal_fusion_engine.py`)
- Signal fusion → Market intelligence: uses intelligence (evidence: `SignalMaestro/signal_fusion_engine.py`)
- Backtest orchestration → Historical data: loads data (evidence: `SignalMaestro/backtester/cli.py`)
- Backtest orchestration → Backtest signals: generates signals (evidence: `SignalMaestro/backtester/cli.py`)
- Backtest orchestration → Backtest leverage: calculates leverage (evidence: `SignalMaestro/backtester/cli.py`)
- Backtest orchestration → Backtest risk: manages risk (evidence: `SignalMaestro/backtester/cli.py`)
- Backtest orchestration → Execution simulator: simulates execution (evidence: `SignalMaestro/backtester/cli.py`)
- Backtest orchestration → Backtest metrics: reports metrics (evidence: `SignalMaestro/backtester/cli.py`)
