A sophisticated algorithmic trading system designed for cryptocurrency and forex futures markets. This bot implements a multi-indicator strategy with advanced risk management, position tracking, and real-time monitoring capabilities.
- Overview
- Strategy Description
- Key Features
- Backtesting Results
- Live Testing
- Installation
- Configuration
- Usage
- Risk Management
- Performance Metrics
- Contact & Support
Botara 3.0 is the result of extensive research and development in algorithmic trading. It combines multiple technical indicators with sophisticated risk management to execute trades automatically on futures markets. The strategy has been thoroughly backtested using Bitget and Blofin candle data across multiple cryptocurrency and forex pairs, showing consistent profitability.
Supported Exchanges:
- Cryptocurrency: Binance, Bitget, Blofin, Bybit, and more
- Forex: MetaTrader4/5 platforms
- Stock TradeStation and more
Current Status: Successfully live testing for 2+ months with positive results. Ongoing live testing continues.
The bot employs a multi-indicator crossover strategy that combines:
- Fisher Transform (FS) - Identifies potential trend reversals and momentum shifts
https://www.tradingview.com/support/solutions/43000589141/ - RSI (Relative Strength Index) - Filters entries based on overbought/oversold conditions
https://www.tradingview.com/support/solutions/43000502338/ - Volume Oscillator - Ensures trades are taken during periods of volume confirmation
https://www.tradingview.com/support/solutions/43000591350/ - ATR (Average True Range) - Dynamically adjusts stop-loss and take-profit levels based on market volatility
https://www.tradingview.com/support/solutions/43000501823/
Long Positions:
- FS crosses above TR (bullish crossover)
- RSI deviates significantly from 50 (momentum confirmation)
- FS/TR magnitude exceeds threshold (strong signal strength)
- Volume oscillator is positive (volume confirmation)
Short Positions:
- FS crosses below TR (bearish crossover)
- RSI is near neutral (contrarian entry)
- FS/TR magnitude exceeds threshold
- Volume oscillator is positive
- Take Profit: ATR-based dynamic take-profit levels
- Stop Loss: ATR-based dynamic stop-loss with trailing stop functionality
- Half Exit: Automatic 50% position closure at first take-profit target
- Trailing Stop: Activates after half exit to protect remaining position
The Entry/Exit Levels have been meticulously optimized using Optuna, a state-of-the-art hyperparameter optimization framework. The optimization process utilized several years of historical market data to ensure robust and reliable parameter sets.
Optuna provides significant advantages over traditional optimization methods:
- Tree-structured Parzen Estimator (TPE) - Advanced Bayesian optimization that efficiently explores the parameter space
- Pruning Mechanism - Automatically stops unpromising trials early, saving computational resources
- Parallel Optimization - Supports distributed optimization across multiple cores/machines
- Visualization Tools - Built-in tools for analyzing optimization history and parameter importance
- Flexible Search Spaces - Supports complex parameter distributions (uniform, log-uniform, categorical, etc.)
- Efficient Sampling - Intelligently samples parameter combinations based on previous trial results
- Historical Data: Several years of market data from multiple exchanges
- Objective Function: Maximized Sharpe ratio, profit factor, and minimized drawdown
- Validation: Walk-forward analysis to prevent overfitting
- Result: Optimized parameters that balance profitability with risk management
This data-driven approach ensures that the Entry/Exit Levels are not arbitrary but are statistically validated against extensive historical market conditions.
- Automated Signal Detection - Monitors market conditions every hour
- Dual Position Support - Can hold both long and short positions simultaneously
- Dynamic Risk Management - ATR-based stop-loss and take-profit calculations
- Trailing Stop Loss - Automatically adjusts stop-loss to lock in profits
- Partial Position Exits - Takes profit on 50% of position while letting winners run
- Position Replacement - Automatically replaces losing positions with better entry points
- Real-time Position Monitoring - Checks positions every second
- Trade History Tracking - Complete CSV-based trade log
- Performance Metrics - Win rate, drawdown, daily PnL tracking
- Webhook Integration - Real-time notifications for trades and statistics
- Daily PnL Reports - Automated performance summaries
- Thread-safe Operations - Multi-threaded architecture for concurrent operations
- State Persistence - Resumes from CSV on restart
- Error Handling - Robust error handling and recovery
- Command Interface - Interactive CLI for manual control
- Multi-Exchange Support - Compatible with Binance, Bitget, Blofin, Bybit APIs
- Forex Platform Support - Available for MT4 and MT5 platforms
- Optuna-Optimized Parameters - Entry/Exit levels optimized using advanced hyperparameter optimization
The strategy has been extensively backtested using Bitget and Blofin candle data across multiple markets:
- โ ETH/USDT - Strong performance
- โ SOL/USDT - Excellent results
- โ LINK/USDT - Profitable
- โ UNI/USDT - Consistent gains
- โ DOGE/USDT - Good performance
- โ SUSHI/USDT - Positive returns
- โ TAO/USDT - Strong results
- โ ZEC/USDT - Profitable
- โ EUR/USD - Consistent performance
- โ GBP/USD - Strong results
- Working now
๐ Detailed backtesting results with charts and trade logs are available in the
crypto_symbols/andforex_symbols/directories.
Current Status: โ Live testing in progress
- Duration: 2+ months of successful live trading
- Performance: Positive results with consistent profitability
- Ongoing: Continuous live testing and optimization
The bot is currently running live trades and demonstrating strong performance in real market conditions.
- Python 3.8 or higher
- pip package manager
git clone https://github.com/simoncampos1022/botara_profitable_futures_trading_strategy_crypto_forex_stock.git
cd botara_strategypip install -r requirements.txtIf requirements.txt doesn't exist, install manually:
pip install requests pandas numpy| Parameter | Description | Default |
|---|---|---|
INITIAL_BALANCE |
Starting capital | 10000 |
LEVERAGE |
Trading leverage | 5x |
POSITION_SIZE_RATIO |
Position size as % of balance | 0.4 (40%) |
INTERVAL |
Candle timeframe | 1H |
FEE_PERCENT |
Trading fee percentage | 0.0006 (0.06%) |
| Indicator | Length | Description |
|---|---|---|
ATR_LENGTH |
14 | Average True Range period |
FS_LENGTH |
10 | Fisher Transform period |
RSI_LENGTH |
14 | RSI calculation period |
โ๏ธ Note: These parameters have been optimized using Optuna framework with several years of historical data. The optimization process utilized advanced Bayesian optimization techniques to find optimal parameter combinations that maximize profitability while minimizing risk.
Long Positions:
- FS Entry Level: ? (Optuna-optimized)
- RSI Entry Level: ? (Optuna-optimized)
- Stop Loss: ? ร ATR (Optuna-optimized)
- Take Profit: ? ร ATR (Optuna-optimized)
- Trailing Stop: ? ร ATR (Optuna-optimized)
Short Positions:
- FS Entry Level: ? (Optuna-optimized)
- RSI Entry Level: ? (Optuna-optimized)
- Stop Loss: ? ร ATR (Optuna-optimized)
- Take Profit: ? ร ATR (Optuna-optimized)
- Trailing Stop: ? ร ATR (Optuna-optimized)
python botara3_bot.pyOnce running, you can use these commands:
help - Show available commands
force open long - Manually open a long position
force open short - Manually open a short position
force close long - Manually close long position
force close short - Manually close short position
force half close long - Close 50% of long position
force half close short - Close 50% of short position
balance - Show current balance
price - Show current price
exit - Shutdown the bot
The bot automatically:
- Updates indicators every hour (at :00:05 UTC)
- Checks for entry/exit signals
- Monitors positions every second
- Updates trailing stops in real-time
- Saves all trades to CSV
- Uses 40% of available balance per position
- Leverage: 5x (configurable)
- Maximum 1 long and 1 short position simultaneously
- Dynamic ATR-based stop-loss levels
- Trailing stop activates after take-profit hit
- Real-time monitoring every second
- First target: Close 50% of position
- Remaining 50%: Protected by trailing stop
- Maximizes profit while securing gains
- Position replacement logic (replaces losing positions)
- Volume confirmation required for entries
- Multiple indicator confirmation before entry
The bot tracks comprehensive performance metrics:
- Total PnL - Overall profit/loss percentage
- Win Rate - Percentage of profitable trades
- Max Drawdown - Maximum peak-to-trough decline
- Daily PnL - Daily profit/loss tracking
- Total Trades - Number of completed trades
- Last Trade PnL - Most recent trade performance
All metrics are automatically sent via webhook after each closed trade.
botara_strategy/
โโโ blofin_eth_bot.py # Main trading bot
โโโ eth_blofin_history.csv # Trade history (auto-generated)
โโโ crypto_symbols/ # Crypto backtesting results
โ โโโ case_ETHUSDT_chart.html
โ โโโ case_ETHUSDT_trades.csv
โ โโโ ...
โโโ forex_symbols/ # Forex backtesting results
โ โโโ case_EURUSD_chart.html
โ โโโ case_EURUSD_trades.csv
โ โโโ ...
โโโ logo.png # Project logo
โโโ html_guide.gif # Visualization guide
โโโ README.md # This file
As a senior software engineer and trading expert with extensive experience in:
- Algorithmic trading automation
- Backtesting strategies
- Strategy optimization
- Python development
I'm available to help with:
- ๐ Trading Automation - Custom bot development
- ๐ Backtesting - Strategy validation and testing
- โ๏ธ Optimization - Parameter tuning and strategy refinement
- ๐ป Development - Python trading system development
- Telegram: @simoncampos1022
- Email: simon.campos1022@gmail.com
Feel free to reach out for collaboration, consulting, or any questions about algorithmic trading!
Happy Trading!

