Skip to content

akimabs/autrade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AutoTrade - Cryptocurrency Trading Bot (Winrate Testing)

A Python-based cryptocurrency trading bot that uses technical analysis to make trading decisions on Binance Futures.

Screenshots

Loss Trade Profit Trade Summary Report
Loss Trade Profit Trade Summary Report

Features

  • Real-time market analysis using technical indicators (RSI, EMA, Bollinger Bands)
  • Multiple trading modes (safe, balanced, aggressive)
  • Risk management with configurable stop-loss and take-profit levels
  • Telegram notifications for trade entries, exits, and daily summaries
  • Automated position management
  • Performance tracking and reporting
  • Trade during US market hours: 22:00–07:00 (Indonesian time).

Installation

  1. Clone the repository:
git clone https://github.com/akimabs/autrade.git
cd autrade
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install the package:
pip install -e .
  1. Create a .env file in the project root with your configuration:
BINANCE_API_KEY=your_api_key
BINANCE_API_SECRET=your_api_secret
TELEGRAM_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
TRADING_MODE=balanced  # Options: safe, balanced, aggressive
FIXED_USDT_BALANCE=100  # Set your desired fixed trading amount in USDT

Usage

Run the bot:

python -m autrade.main

Configuration

The bot can be configured through environment variables:

  • TRADING_MODE: Trading strategy aggressiveness (safe, balanced, aggressive)
  • BINANCE_API_KEY: Your Binance API key
  • BINANCE_API_SECRET: Your Binance API secret
  • TELEGRAM_TOKEN: Your Telegram bot token
  • TELEGRAM_CHAT_ID: Your Telegram chat ID
  • FIXED_USDT_BALANCE: Set a fixed USDT balance for trading (e.g., "100" for 100 USDT). This helps manage risk by limiting the trading amount regardless of your total balance.

Example .env configuration:

BINANCE_API_KEY=your_api_key
BINANCE_API_SECRET=your_api_secret
TELEGRAM_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
TRADING_MODE=balanced  # Options: safe, balanced, aggressive
FIXED_USDT_BALANCE=100  # Set your desired fixed trading amount in USDT

Trading Modes

  1. Safe Mode

    • Leverage: 1x
    • Take Profit: 0.5%
    • Stop Loss: 0.3%
  2. Balanced Mode

    • Leverage: 10x
    • Take Profit: 1.0%
    • Stop Loss: 0.5%
  3. Aggressive Mode

    • Leverage: 25x
    • Take Profit: 0.6%
    • Stop Loss: 0.3%

Risk Management

  • Maximum spread: 0.15%
  • Maximum consecutive losses: 3
  • Maximum daily trades: 10
  • Minimum ATR ratio: 0.5%

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Binance Future Trading Bot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published