The Autobot Trading Bot is designed to capitalize on market trends by employing technical analysis indicators. The bot is optimized for trading cryptocurrencies, AI stocks, and tech stocks, and operates using a combination of trend confirmation and volatility analysis techniques.
This document outlines the bot's functionality, setup, and usage.
-
Moving Averages (MAs):
- Uses Exponential Moving Averages (EMA) to identify trends.
- Significant separation between moving averages (e.g., 20 EMA and 50 EMA) indicates a strong trend.
-
Relative Strength Index (RSI):
- RSI > 70 triggers a sell signal.
- RSI < 30 triggers a buy signal.
- Signals are used only when confirmed by moving averages.
-
Average True Range (ATR):
- Measures market volatility.
- High ATR suggests trending potential.
- Low ATR indicates likely mean-reversion.
-
Average Directional Index (ADX):
- ADX > 25 signals a strong trend.
- ADX < 20 indicates a weak trend.
-
Volume-Based Filter:
- Confirms breakouts or trend strength.
- Relative Volume > 1.5 indicates strong market participation.
-
Average Directional Index:
- Strong Directional Index > 25
- Weak Directional index < 20
- Cryptocurrencies (e.g., Bitcoin, Ethereum)
- AI stocks
- Tech stocks
The bot employs a trend-following approach by combining multiple indicators to:
- Detect and confirm trends.
- Filter out false signals.
- Adapt to varying market conditions.
- Python 3.11+
- Libraries:
- 'os'
- 'yaml'
- 'structlog'
- 'datetime'
- 'yfinance'
- 'pandas'
- 'numpy'
- 'matplotlib'
- 'smtplib'
- 'requests'
- 'bs4'
- 'json'
-
Clone the repository:
git clone https://github.com/username/autobot.git cd autobot
-
Install the dependencies:
pip install -r requirements.txt
-
Configure API keys:
- Add your exchange API keys to
config.json
.
- Add your exchange API keys to
-
Run the bot:
Python -m prime --set args_group=<manual_list|trending|categorical>
-
Backtesting:
- Not functioning at the moment
- Use historical data to test strategies.
- Example:
python backtest.py --symbol BTC/USD --start 2020-01-01 --end 2022-01-01
-
Live Trading:
- Activate live trading mode by updating the
config.json
file. - Monitor trades in real-time through logs or dashboards.
- Activate live trading mode by updating the
- Fetch live or historical data.
- Compute technical indicators (MAs, RSI, ATR, ADX, Volume).
- Confirm trends using a multi-indicator approach.
- Execute trades based on:
- Buy signals: RSI < 30, strong trend (ADX > 25), high volatility (ATR).
- Sell signals: RSI > 70, strong trend (ADX > 25), high volatility (ATR).
- Log trades and monitor performance.
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit changes and create a pull request.
Before committing code, ensure the following:
- Run
pre-commit run --all-files
to apply hooks.
- Add Mean-Reversion functionality for non-trending markets
- Database/storage functionalities
- Add Backtesting functionality
- Add a Sentiment Score using
vaderSentiment
This project is licensed under the MIT License. See the LICENSE
file for details.
For questions or issues, feel free to open an issue on GitHub or contact Michael Hammond at jolllofcodes@gmail.com.
This bot was developed with a focus on simplicity and robustness, utilizing well-established technical indicators and strategies.