This project is a Dash application designed to visualize significant trading days for the BankNifty index. It displays candlestick charts along with associated indicators such as the AD Line, EMA, and weighted volume. The application is interactive, allowing users to navigate through significant days using a slider or buttons.
- Candlestick Charts: Visual representation of price movements (open, high, low, close) for BankNifty.
- AD Line and EMA Indicators: Plots the AD Line (Weighted) and its 9-period EMA.
- Volume Analysis: Displays weighted volume with color coding to differentiate between bullish and bearish candles.
- Interactive Slider: Allows users to select and view significant days where large price movements occurred.
- Day Navigation: Previous and Next buttons facilitate easy navigation between significant days.
Before you can run the application, ensure you have the following installed:
- Python 3.7+
- Dash
- Plotly
- Pandas
- SQLite3
- psutil
-
Clone the repository:
git clone https://github.com/your-username/banknifty-visualization.git cd banknifty-visualization
-
Install the required Python packages:
pip install dash plotly pandas psutil
-
Set up your SQLite database:
Ensure that you have the SQLite database (
IntradayGGData.db
) containing the BankNifty data. If you need to populate it, you can use theGetDataForGGBackTest
module or any other method to fetch and store data in thebanknifty
table.
-
Run the Dash application:
python app.py
-
Access the app:
Once the server is running, open your browser and go to
http://127.0.0.1:8051
to interact with the visualization.
- app.py: The main script that initializes and runs the Dash application.
- GetDataForGGBackTest.py: A module to prepare the data for visualization.
- IntradayGGData.db: SQLite database file containing the BankNifty data (not included in the repo).
- significant_days.csv: CSV file generated by the app, storing significant days identified by the application.
-
Data Loading and Processing:
- The app loads data from the SQLite database and filters for significant days where the BankNifty index showed a one-sided move of 350 points or more.
- It identifies the previous and next trading days for each significant day.
-
Interactive Visualization:
- Users can select a day using the slider, which triggers a callback to update the candlestick chart along with the AD Line, EMA, and volume plots for the selected period.
- Vertical lines are added at the end of each day (EOD) for clarity.
-
Performance Monitoring:
- The app includes memory usage monitoring to optimize performance and prevent memory leaks.
- App Becomes Unresponsive: Ensure your system has sufficient memory to handle large datasets. Check the efficiency of your callbacks and consider optimizing database queries or reducing the amount of data processed.
- Rangebreaks Issue: If you encounter issues with
rangebreaks
, consider updating your Plotly and Dash packages or commenting out therangebreaks
settings.
Feel free to fork this repository and contribute by submitting a pull request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
- The Dash and Plotly community for providing a powerful visualization framework.
- The original creators of the data and indicators used in this application.