# nadiraliofficial/nasdaq-stock-screener architecture

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

- Interactive diagram: https://gitdiagram.com/nadiraliofficial/nasdaq-stock-screener
- Repository: https://github.com/nadiraliofficial/nasdaq-stock-screener

## Overview

Nasdaq Stock Screener is a Tkinter desktop application. The main workflow lets users choose a screening date, load and select tickers, fetch extended-hours historical bars from Interactive Brokers, apply selected technical conditions, and view or export screened results. The README also describes EMA, RSI, volume, and market-cap criteria; their implementation details are not shown in the excerpts. `script.py` is documented as an alternative, unused entry point. Source excerpts are partial, so edges are limited to relationships visible there or stated in the README.

Main entry points: [`main.py`](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py) (Screening run), [`tickers.txt`](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/tickers.txt) (Ticker list), [`screener_results.txt`](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/screener_results.txt) (Results file)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Desktop interface"]
  node_main_app["Main GUI<br/>[main.py]"]
  node_ticker_input["Ticker selection<br/>[main.py]"]
  node_date_conditions["Date and conditions<br/>[main.py]"]
  node_ticker_list["Ticker list<br/>[tickers.txt]"]
  node_alternative["Alternative screener<br/>[script.py]"]
end

subgraph group_screening["Screening workflow"]
  node_screening_run["Screening run<br/>[main.py]"]
  node_condition_eval["Technical conditions<br/>[main.py]"]
end

subgraph group_market["Market data"]
  node_market_fetch["Historical data fetch<br/>[main.py]"]
  node_ibkr["Interactive Brokers"]
end

subgraph group_outputs["Screening outputs"]
  node_result_view["Results table<br/>[main.py]"]
  node_result_save["Save results<br/>[main.py]"]
  node_results_file["Results file"]
end

node_user(("User"))

node_user -->|"uses"| node_main_app
node_user -->|"uploads"| node_ticker_list
node_main_app -->|"provides"| node_ticker_input
node_main_app -->|"provides"| node_date_conditions
node_ticker_input -->|"reads"| node_ticker_list
node_user -->|"starts"| node_screening_run
node_screening_run -->|"fetches bars"| node_market_fetch
node_market_fetch -->|"requests data"| node_ibkr
node_screening_run -->|"applies criteria"| node_condition_eval
node_screening_run -->|"displays results"| node_result_view
node_user -->|"exports"| node_result_save
node_result_save -->|"writes"| node_results_file

click node_main_app "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_ticker_input "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_date_conditions "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_ticker_list "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/tickers.txt"
click node_screening_run "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_condition_eval "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_market_fetch "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_result_view "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_result_save "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py"
click node_results_file "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/screener_results.txt"
click node_alternative "https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/script.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_main_app,node_ticker_input,node_date_conditions,node_ticker_list,node_alternative,node_user toneBlue
class node_screening_run,node_condition_eval toneAmber
class node_market_fetch,node_ibkr toneMint
class node_result_view,node_result_save,node_results_file toneRose
```

## Components

### Desktop interface

- [Main GUI](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- [Ticker selection](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- [Date and conditions](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- [Ticker list](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/tickers.txt): `tickers.txt`
- [Alternative screener](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/script.py): `script.py`

### Screening workflow

- [Screening run](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- [Technical conditions](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`

### Market data

- [Historical data fetch](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- **Interactive Brokers**

### Screening outputs

- [Results table](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- [Save results](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/main.py): `main.py`
- [Results file](https://github.com/nadiraliofficial/nasdaq-stock-screener/blob/main/screener_results.txt): `screener_results.txt`

### Other components

- **User**

## Connections

- User → Main GUI: uses (evidence: `README.md`)
- User → Ticker list: uploads (evidence: `README.md`)
- Main GUI → Ticker selection: provides (evidence: `main.py`)
- Main GUI → Date and conditions: provides (evidence: `main.py`)
- Ticker selection → Ticker list: reads (evidence: `main.py`)
- User → Screening run: starts (evidence: `README.md`)
- Screening run → Historical data fetch: fetches bars (evidence: `README.md`)
- Historical data fetch → Interactive Brokers: requests data (evidence: `main.py`)
- Screening run → Technical conditions: applies criteria (evidence: `README.md`)
- Screening run → Results table: displays results (evidence: `README.md`)
- User → Save results: exports (evidence: `README.md`)
- Save results → Results file: writes (evidence: `main.py`)
