A real-time chart application that displays and monitors the price ratio between NVIDIA (NVDA) and TSMC (TSM) stocks using Interactive Brokers API.
- Go to the Releases page
- Download
NVDA_TSM_Ratio_Chart.exe
from the latest release - Download
README.txt
for detailed instructions - Start TWS/Gateway and log in
- Double-click the downloaded executable
That's it! The chart will automatically update every 10 seconds.
- Real-time price ratio monitoring
- 100-minute historical data with 1-minute bars
- 20-period moving average
- Auto-updates every 10 seconds
- Statistical analysis (mean, std, min, max)
- Support for both real-time and delayed market data
- Current local time display
- Interactive Brokers TWS (Trader Workstation) or IB Gateway
- Market data subscriptions for NVDA and TSM
For developers:
- Python 3.8 or higher
- Dependencies listed in requirements.txt
- Clone the repository:
git clone https://github.com/yourusername/nvda-tsm-ratio-chart.git
cd nvda-tsm-ratio-chart
- Install dependencies:
pip install -r requirements.txt
- Start TWS/Gateway and log in
- Run the script:
python stock_ratio_chart.py
- Install dependencies:
pip install -r requirements.txt
- Run the build script:
python build_simple.py
- Find the executable in the
dist
directory
- Open TWS/Gateway
- Go to File -> Global Configuration (or Configure in Gateway)
- Select "API" -> "Settings" in the left panel
- Enable "Socket port" and ensure it's set to 7497
- Check "Enable ActiveX and Socket Clients"
- Click "Apply" and "OK"
├── stock_ratio_chart.py # Main application script
├── build_simple.py # Build script for Windows executable
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── LICENSE # MIT License
└── dist/ # Distribution directory
├── NVDA_TSM_Ratio_Chart.exe # Windows executable
└── README.txt # User instructions
To contribute to this project:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
-
If the chart doesn't appear:
- Verify TWS/Gateway is running and logged in
- Check port 7497 is enabled for API connections
- Ensure you have market data permissions for NVDA and TSM
-
If data isn't updating:
- Check your internet connection
- Verify market is open (US market hours)
- Confirm data subscriptions are active in TWS
This project is licensed under the MIT License - see the LICENSE file for details.
This software is for educational purposes only. Use at your own risk. The authors accept no responsibility for trading losses that may be incurred by using this software.