# prasad1612/smart-money-concept architecture

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

- Interactive diagram: https://gitdiagram.com/prasad1612/smart-money-concept
- Repository: https://github.com/prasad1612/smart-money-concept

## Overview

This package fetches historical OHLCV market data, analyzes it for Smart Money Concepts, then presents results as a chart or text summary. The documented CLI and Python usage drive that workflow; the main implementation is concentrated in one large module. Feature nodes therefore share its path rather than implying separate modules. The excerpts show the CLI’s method calls and some analysis and plotting internals, but omit much of the implementation, so capability relationships rely on README documentation.

Main entry points: [`smart_money_concepts/smc.py`](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py) (SMC engine), [`smart_money_concepts/cli.py`](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/cli.py) (CLI runner), [`Usage.py`](https://github.com/prasad1612/smart-money-concept/blob/main/Usage.py) (Python example)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_cli["CLI runner<br/>[cli.py]"]
  node_python_usage["Python example<br/>[Usage.py]"]
end

subgraph group_analysis["Market analysis"]
  node_smc["SMC engine<br/>[smc.py]"]
  node_market_structure["Market structure<br/>[smc.py]"]
  node_order_blocks["Order blocks<br/>[smc.py]"]
  node_fvg["Fair value gaps<br/>[smc.py]"]
  node_equal_levels["Equal highs/lows<br/>[smc.py]"]
  node_zones["Premium/discount zones<br/>[smc.py]"]
end

subgraph group_output["Results"]
  node_chart["Chart overlays<br/>[smc.py]"]
  node_summary["Text summary<br/>[smc.py]"]
end

node_trader(("Analyst"))
node_yahoo["Yahoo Finance"]

node_trader -->|"runs"| node_cli
node_trader -->|"runs"| node_python_usage
node_cli -->|"creates"| node_smc
node_python_usage -->|"creates"| node_smc
node_cli -->|"fetches data via"| node_yahoo
node_python_usage -->|"fetches data via"| node_yahoo
node_cli -->|"prepares and analyzes"| node_smc
node_python_usage -->|"prepares and analyzes"| node_smc
node_smc -->|"detects"| node_market_structure
node_smc -->|"detects"| node_order_blocks
node_smc -->|"detects and tracks"| node_fvg
node_smc -->|"detects"| node_equal_levels
node_smc -->|"maps"| node_zones
node_cli -->|"renders via"| node_chart
node_cli -->|"prints via"| node_summary
node_python_usage -->|"renders via"| node_chart
node_python_usage -->|"prints via"| node_summary

click node_cli "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/cli.py"
click node_python_usage "https://github.com/prasad1612/smart-money-concept/blob/main/Usage.py"
click node_smc "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_market_structure "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_order_blocks "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_fvg "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_equal_levels "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_zones "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_chart "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py"
click node_summary "https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.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_cli,node_python_usage toneBlue
class node_smc,node_market_structure,node_order_blocks,node_fvg,node_equal_levels,node_zones toneAmber
class node_chart,node_summary toneMint
class node_trader,node_yahoo toneIndigo
```

## Components

### Entry points

- [CLI runner](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/cli.py): `smart_money_concepts/cli.py`
- [Python example](https://github.com/prasad1612/smart-money-concept/blob/main/Usage.py): `Usage.py`

### Market analysis

- [SMC engine](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`
- [Market structure](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`
- [Order blocks](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`
- [Fair value gaps](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`
- [Equal highs/lows](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`
- [Premium/discount zones](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`

### Results

- [Chart overlays](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`
- [Text summary](https://github.com/prasad1612/smart-money-concept/blob/main/smart_money_concepts/smc.py): `smart_money_concepts/smc.py`

### Other components

- **Analyst**
- **Yahoo Finance**

## Connections

- Analyst → CLI runner: runs (evidence: `README.md`)
- Analyst → Python example: runs (evidence: `README.md`)
- CLI runner → SMC engine: creates (evidence: `smart_money_concepts/cli.py`)
- Python example → SMC engine: creates (evidence: `Usage.py`)
- CLI runner → Yahoo Finance: fetches data via (evidence: `smart_money_concepts/cli.py`)
- Python example → Yahoo Finance: fetches data via (evidence: `Usage.py`)
- CLI runner → SMC engine: prepares and analyzes (evidence: `smart_money_concepts/cli.py`)
- Python example → SMC engine: prepares and analyzes (evidence: `Usage.py`)
- SMC engine → Market structure: detects (evidence: `README.md`)
- SMC engine → Order blocks: detects (evidence: `README.md`)
- SMC engine → Fair value gaps: detects and tracks (evidence: `README.md`)
- SMC engine → Equal highs/lows: detects (evidence: `README.md`)
- SMC engine → Premium/discount zones: maps (evidence: `README.md`)
- CLI runner → Chart overlays: renders via (evidence: `smart_money_concepts/cli.py`)
- CLI runner → Text summary: prints via (evidence: `smart_money_concepts/cli.py`)
- Python example → Chart overlays: renders via (evidence: `Usage.py`)
- Python example → Text summary: prints via (evidence: `Usage.py`)
