# prrix999/nifty-moving-average architecture

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

- Interactive diagram: https://gitdiagram.com/prrix999/nifty-moving-average
- Repository: https://github.com/prrix999/nifty-moving-average

## Overview

This small learning script has one workflow: download Nifty 50 daily prices, calculate moving averages, and save a candlestick chart. The README documents the external tools and output; the only source file is shown in full, so the graph reflects its direct calls.

Main entry points: [`chart.py`](https://github.com/prrix999/nifty-moving-average/blob/main/chart.py) (Daily data download)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_analysis["Price analysis"]
  node_download["Daily data download<br/>[chart.py]"]
  node_moving_averages["Moving averages<br/>[chart.py]"]
end

subgraph group_visualization["Chart output"]
  node_candlestick["Candlestick chart<br/>[chart.py]"]
  node_output["nifty_ma.png"]
end

node_user(("Script runner"))
node_yahoo["Yahoo Finance"]

node_user -->|"runs script"| node_download
node_download -->|"downloads prices"| node_yahoo
node_download -->|"provides data"| node_moving_averages
node_moving_averages -->|"plots averages"| node_candlestick
node_download -->|"provides prices"| node_candlestick
node_candlestick -->|"saves chart"| node_output

click node_download "https://github.com/prrix999/nifty-moving-average/blob/main/chart.py"
click node_moving_averages "https://github.com/prrix999/nifty-moving-average/blob/main/chart.py"
click node_candlestick "https://github.com/prrix999/nifty-moving-average/blob/main/chart.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_download,node_moving_averages toneBlue
class node_candlestick,node_output toneAmber
class node_user,node_yahoo toneIndigo
```

## Components

### Price analysis

- [Daily data download](https://github.com/prrix999/nifty-moving-average/blob/main/chart.py): `chart.py`
- [Moving averages](https://github.com/prrix999/nifty-moving-average/blob/main/chart.py): `chart.py`

### Chart output

- [Candlestick chart](https://github.com/prrix999/nifty-moving-average/blob/main/chart.py): `chart.py`
- **nifty_ma.png**

### Other components

- **Script runner**
- **Yahoo Finance**

## Connections

- Script runner → Daily data download: runs script (evidence: `README.md`)
- Daily data download → Yahoo Finance: downloads prices (evidence: `chart.py`)
- Daily data download → Moving averages: provides data (evidence: `chart.py`)
- Moving averages → Candlestick chart: plots averages (evidence: `chart.py`)
- Daily data download → Candlestick chart: provides prices (evidence: `chart.py`)
- Candlestick chart → nifty_ma.png: saves chart (evidence: `chart.py`)
