#AIBinance #CryptoBot #TradingBot #BİNANCEFUTURES #OpenClaw

What is CryptoBot?


CryptoBot is a fully automated Binance Futures trading bot running 24/7 on a Raspberry Pi. It scans 12 USDT pairs every 60 seconds, applies technical indicator-based strategies (ADX, EMA, RSI, Bollinger Bands, Multi-Timeframe analysis), and executes trades with automated stop-loss management, breakeven protection, and trailing stops.


Everything is controlled via Telegram — 30+ commands for monitoring, configuration, and risk management. No web dashboard needed, just your phone.



This Week: The Breakeven Bug Hunt


This was a tough week. The bot went from profitable to flat, and it took serious debugging to find out why.


The symptom: Trades were opening correctly, hitting profit targets... and closing at exactly 0.00 USDT. Every. Single. Time.


The root cause: Our breakeven mechanism was triggering too early. When a trade reached +1.2% ROI, the stop-loss was moved to the exact entry price. But with a take-profit target at +3.0% ROI, there was too much distance to cover. Normal market noise would retrace 1-2%, hit the breakeven stop, and close the trade at zero profit.


Essentially, the bot was protecting against losses so aggressively that it was preventing wins.


The fix (deployed today):


ParameterBefore (broken)After (fixed)Breakeven trigger+1.2% ROI+2.0% ROIBreakeven SL priceExact entry (0.00 profit)Entry +0.15% (covers fees)Trailing trigger+1.3% ROI+2.5% ROITrailing lock+1.0% profit+1.5% profit

Now trades have room to breathe. The breakeven only kicks in after a meaningful move, and when it does, it locks in enough to at least cover trading fees.



Other Fixes This Week


IP Change Monitor — Binance API requires whitelisted IPs. Our ISP changed our public IP, and the bot couldn't trade for hours before we noticed. We built a background task that checks the IP every 5 minutes and sends a Telegram alert if it changes, including an API health check.


Market-Aware Auto-Tuner — The bot has a 5-level sensitivity system. Previously, when no trades happened for 6+ hours, it would automatically increase sensitivity. Problem: in a ranging market (ADX < 25 across all coins), increasing sensitivity just means taking bad trades. Now the tuner checks a Market Score (0-100) based on BTC's ADX and volatility before adjusting. If the market is dead, it stays put.


Stop-Loss Architecture — We discovered a critical vulnerability: when updating a stop-loss, the old order was deleted before the new one was created. If the API failed between those two steps, the position was completely unprotected. The new logic creates first, then deletes — so there's always at least one stop-loss active.



The Numbers (Honest)


Total: 113 trades over 2 weeks
Win Rate: 50% (52W / 52L)
PnL: +5.47 USDT
Strategy: Q1 Trend-Following (only active strategy)
Capital: ~400 USDT, 2x leverage, 20 USDT per trade

Is +5.47 USDT impressive? No. But we preserved capital through one of the choppiest crypto markets in months, while finding and fixing critical bugs. The bot didn't blow up. That matters.



Architecture Overview


Raspberry Pi (24/7)
|
├── main.py — Event loop, background tasks, Telegram handler
├── signals.py — Signal generation (ADX, EMA, RSI, BB, MTF)
├── trades.py — Order execution via Binance API
├── order_tracker.py — Trade lifecycle management
├── telegram_utils.py — 30+ Telegram commands + order monitoring
├── auto_tuner.py — Market-aware parameter adjustment
├── sl_watchdog.py — Stop-loss integrity verification
├── ip_monitor.py — Public IP change detection
└── config.py — All parameters in one place

Telegram Commands (selection):



  • /status — Balance, positions, heartbeat


  • /stats — Win rate, PnL, trade count


  • /strategy — Enable/disable strategies live


  • /tuner — Market score, auto-tuner status


  • /hours — Performance by time-of-day analysis


  • /ip — IP monitor status


  • /shell — Execute commands on the Pi remotely


  • /botrestart / /reboot — Remote restart



Signal Bot: A separate Telegram bot that broadcasts trade signals to subscribers in real-time.



Key Learnings


  1. Breakeven protection can kill profitability if triggered too early. The gap between breakeven trigger and take-profit target matters more than you think.

  2. Stop-loss order of operations is critical. Always CREATE new protection before DELETE old protection. Never leave a position exposed, even for milliseconds.

  3. Market-awareness prevents self-destruction. A bot that blindly increases sensitivity in a dead market will lose money. Teach it to recognize when doing nothing is the right move.

  4. Live performance differs massively from testnet. Our live win rate averaged 50-63% while testnet consistently showed 37-39%. Only trust live data.

  5. Data-driven decisions > intuition. We analyzed 108 trades and found that overnight trades (00:00-06:00) significantly outperform daytime trades. The bot now has dynamic trading hour blacklists based on actual performance data.

What's Next

  • Collect more data with the new breakeven parameters


  • No further code changes until we have 50+ trades with the current config


  • Evaluate orderbook quality as an additional entry filter


  • Explore Q2 strategy as a confluence indicator for Q1



The boring answer is: wait and let data accumulate. But that's how you build something that actually works.



Built with Python on Raspberry Pi. Controlled via Telegram. Powered by Binance Futures API. Debugged with Claude (Anthropic).


CryptoBot V6.1.4 — Week 3 of live trading.