This project implements an advanced trading bot using Python. The bot connects to the Binance exchange, evaluates trading signals based on various technical indicators, and executes trades accordingly. It also sends notifications about trading actions and errors to a specified Telegram chat.
- Fetches historical price data for multiple timeframes
- Analyzes order books and recent trades to determine market sentiment
- Uses technical indicators (e.g., EMA, RSI, MACD, Bollinger Bands) for signal evaluation
- Executes market buy/sell orders on Binance
- Implements stop-loss and take-profit mechanisms
- Sends trade notifications to Telegram
AutoBC/
├── bot.py # Main script to run the trading bot
├── config/
│ └── settings.py # Configuration file for storing API keys and trading parameters
├── indicators/
│ └── technical_indicators.py # Module for calculating technical indicators
├── trading/
│ ├── strategy.py # Module for evaluating trading signals
│ └── trader.py # Main trading logic, including order execution and monitoring
└── notifications/
└── telegram_bot.py # Module for sending notifications to Telegram
Technical Indicators
The bot uses the following technical indicators:
- Exponential Moving Average (EMA)
- Weighted Moving Average (WMA)
- Bollinger Bands
- TRIX
- Relative Strength Index (RSI)
- Moving Average Convergence Divergence (MACD)
- Average True Range (ATR)
- Stochastic Oscillator (STOCH)
- Commodity Channel Index (CCI)
- On-Balance Volume (OBV)
- Python 3.7+
- Binance account and API keys
- Telegram bot token and chat ID
-
Clone the repository:
git clone https://github.com/georgetoloraia/AutoBC.git cd AutoBC
-
Create and activate a virtual environment:
- On Linux/Mac
python3 -m venv venv source venv/bin/activate
- On Windows
python -m venv venv .venv/bin/activate
-
Install the required Python packages:
pip install -r requirements.txt
-
Set up your environment variables:
- Create a
.env
file in the root directory of the project and add the following:
API_KEY=your_binance_api_key SECRET=your_binance_secret TELEGRAM_TOKEN=your_telegram_bot_token TELEGRAM_CHAT_ID=your_telegram_chat_id
- Create a
-
Activate the virtual environment:
source venv/bin/activate # On Windows use .\venv\Scripts\activate
-
Run the bot:
python bot.py
-
Deactivate the virtual environment when done:
deactivate
The bot logs its activity to results.txt in the root directory. The log includes information about fetched data, evaluated signals, placed orders, and any errors encountered.
- Contributions are welcome!
- Please fork the repository and submit a pull request with your changes.
For Discord Server click this invitation [https://discord.gg/F6DuQYXA]
## Contact
For any inquiries or issues, please contact [[email protected]].
---
By following these steps, you will be able to set up and run your advanced trading bot efficiently. If you have any questions or need further assistance, feel free to reach out. Happy trading!