AlgoTradeIND is a stock trading web application that provides real-time price updates using WebSockets and technical indicator-based trading signals. The app supports trading on both the NASDAQ (US) and Nifty Fifty (India) markets, ensuring that signals are generated according to their respective market timings.
- Live Stock Price Updates: Utilizes
ylivetickerWebSocket connections for real-time data. - Signal Generation: Uses
yfinanceto analyze 60 days of historical data and generate buy/sell signals. - Responsive UI: Built with TailwindCSS (installed locally) for a modern and clean interface.
- Paper Trading: Practice buying and selling stocks based on dynamically generated trading signals.
- Live price updates and signal generation are available even without the database setup.
- If you only need real-time stock prices and trading signals, you can skip the database setup.
- For full paper trading functionality, complete the admin panel setup and user account creation.
mkdir AlgoTradeIND
git clone https://github.com/nestcub/AlgoTradeIND.git
cd AlgoTradeINDCreate and activate a virtual environment:
python -m venv venv
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtRun the following commands to set up the database:
python manage.py makemigrations
python manage.py migrateCreate a superuser for accessing the Django admin panel:
python manage.py createsuperuserFollow the prompts to set up a username, email, and password.
Open a new terminal in the project directory and run:
npm installThis will install necessary TailwindCSS dependencies and create a node_modules folder.
Start the TailwindCSS build process:
npm run devGo back to the terminal where the Python virtual environment is activated and run:
python manage.py runserver- Open your browser and go to:
http://127.0.0.1:8000/admin/ - Log in with the superuser credentials you created.
- Create a user, add it to accounts in the admin panel.
Modify the following line in views.py to match the username you created in the admin panel.
This line appears twice in different functions:
dummy_user = User.objects.get(username='test1') # Change 'test1' to your created usernameOnce updated, you can now run the paper trading model.
- Backend: Django, WebSockets (
yliveticker),yfinance - Frontend: Django Templates, TailwindCSS
- Database: SQLite (default) or PostgreSQL (optional)
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
feature-branch) - Commit your changes
- Open a pull request