This repository contains an implementation of a trading strategy using multiple technical indicators and pattern detection. The strategy analyzes historical price data to generate signals for entering and exiting trades based on specific conditions defined through various technical indicators. Additionally, the implementation includes visualizations using Plotly for candlestick charts.
The project includes a script that:
- Loads Historical Data: Uses a pre-saved dataset (e.g.,
BTC_USDT_USDT-1h-futures.feather
) to analyze trading data. - Applies Technical Indicators: Populates the DataFrame with multiple technical indicators.
- Generates Trading Signals: Creates buy (
enter_long
) and sell (enter_short
) signals based on a combination of technical indicators. - Creates Visualizations: Generates and saves a candlestick chart using Plotly.
To run the project, install the required Python libraries:
pip install -r requirements.txt
If you need to install TA-Lib, follow the TA-Lib installation guide for your specific platform.
To run the script, use the following command:
python3 sample.py
The script will:
- Load historical data from a specified file.
- Apply technical indicators and generate trading signals.
- Create a candlestick chart with the results.
- Save the generated chart as an HTML file in the
./plot
directory.
indicators/
: Custom indicator files for analysis.plotting/
: Utilities for plotting and visualizing the results.utils/
: Helper functions for logging and loading data.data/
: Folder containing sample datasets (ensure the correct file path in the script).plot/
: Folder containing generated html candlestick chart.
Below is an example of a generated candlestick chart with various indicators overlayed.
- Make sure to adjust the file paths and date ranges as needed based on your data and analysis requirements.
- The sample dataset should be in a format compatible with Pandas, e.g., Feather, CSV.
Feel free to fork this repository, submit issues, and make pull requests if you have suggestions or improvements for the strategy or visualizations.