Giter VIP home page Giter VIP logo

autobc's Introduction

Advanced Trading Bot

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.

Features

  • 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

Project Structure

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)

Requirements

  • Python 3.7+
  • Binance account and API keys
  • Telegram bot token and chat ID

Installation

  1. Clone the repository:

    git clone https://github.com/georgetoloraia/AutoBC.git
    cd AutoBC
  2. 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
  3. Install the required Python packages:

    pip install -r requirements.txt
  4. 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

Usage

  1. Activate the virtual environment:

    source venv/bin/activate  # On Windows use .\venv\Scripts\activate
  2. Run the bot:

    python bot.py
  3. Deactivate the virtual environment when done:

    deactivate

Logging

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.

Contributing

  • 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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.