Erster Start

Warum zwei separate Bots?

Der ByNinja Trading Bot arbeitet mit einer hochstabilen Dual-Prozess-Architektur. Der Telegram-Bot und der Trading Bot laufen unabhängig voneinander. Dies stellt sicher, dass selbst wenn ein Prozess einen unerwarteten Fehler erleidet, der andere weiterhin nahtlos funktioniert. Das run.sh-Skript fungiert als Prozessmanager, der die Bots automatisch neu startet, wenn sie abstürzen, was einen unterbrechungsfreien 24/7-Betrieb garantiert.

Für ultimative Zuverlässigkeit ist das System in zwei isolierte Prozesse aufgeteilt. Wenn die Handelsengine Netzwerklatenz oder eine unerwartete Python-Ausnahme erfährt, bleibt Ihre Telegram-Steuerung vollständig reaktionsfähig. Das run.sh-Skript startet den abgestürzten Prozess sofort neu. Beide Bots kommunizieren nahtlos über eine sichere lokale TCP-Verbindung miteinander.

Standardmäßig synchronisieren sich die Bots über den folgenden lokalen TCP-Port (konfiguriert in Ihren Einstellungen):

Code
TCP_SERVER_PORT = 55110

1. Telegram-Bot starten

Öffnen Sie zuerst Ihr Terminal und navigieren Sie zum Stammverzeichnis des Bot-Repositories. Starten Sie den Telegram-Bot-Prozess. Er fungiert als Ihre Kommandozentrale und Ihr Benachrichtigungssystem.

Code
cd byninja-trading-bot
Code
./run.sh telegram

Erwartete Telegram-Bot-Protokolle

Code
TelegramBot - INFO - 🔍 Checking Telegram connection...
TelegramBot - INFO - Telegram connected | Bot: @Bot
TelegramBot - INFO - ✅ Telegram connected successfully
TelegramBot - INFO - 📋 Telegram command menu registered successfully.
TelegramTCP - INFO - 🚀 TCP server started on port 55110
TelegramBot - INFO - 🎯 Server ready to work on port 55110
TelegramTCP - INFO - 🔍 Waiting for client connection...
TelegramBot - INFO - 💡 All TCP messages will be forwarded to Telegram
TelegramTCP - INFO - 🚀 Server started on localhost:55110
TelegramBot - INFO - 🕹️ Telegram command handler started...
TelegramTCP - INFO - 🔗 Client connected: ('*.*.*.*', *****)

2. Trading Bot starten

Öffnen Sie ein neues Terminalfenster, navigieren Sie erneut zum Stammverzeichnis des Repositories und starten Sie die Kern-Handelsengine. Dieser Prozess übernimmt die eigentliche Marktanalyse und Binance-Ausführung.

Code
cd byninja-trading-bot
Code
./run.sh trading

Erwartete Trading-Bot-Protokolle

Code
TradingBot - DEBUG - 🥷 BYNINJA TRADING BOT v0.1.0
TradingBot - DEBUG - ============================================================
TradingBot - INFO - ✅ Loaded 0 records from active_positions.pkl
TradingBot - DEBUG - 🔄 Background save thread started
TradingBot - INFO - 📁 File pending_orders.pkl not found, creating new
TradingBot - DEBUG - 🔄 Background save thread started
TradingBot - INFO - 📁 File symbol_controls.pkl not found, creating new
TradingBot - DEBUG - 🔄 Background save thread started
TradingBot - INFO - ✅ Loaded 11 records from closed_trades_v0.1.0.pkl
TradingBot - DEBUG - 🔄 Background save thread started
TradingBot - INFO - 📊 RiskManager initialized for version 0.1.0
TradingBot - INFO - 📈 Loaded 11 closed trades
TradingBot - INFO - 🥷 ByNinja Trading Bot initialization with capital: $1000.00
TradingBot - INFO - ✅ Successfully connected to Binance
TradingBot - DEBUG - 🎯 Available trading pairs: 5
TradingBot - DEBUG -    - AVAXUSDT
TradingBot - DEBUG -    - LINKUSDT
TradingBot - DEBUG -    - DOTUSDT
TradingBot - DEBUG -    - XRPUSDT
TradingBot - DEBUG -    - ATOMUSDT
TradingBot - INFO - 🔄 Starting TCP client
TradingTCP - INFO - 🔄 Connecting to TCP server...
TradingTCP - INFO - ✅ Connected to server localhost:55110
TradingTCP - INFO - ✅ TCP client connected successfully
TradingBot - INFO - 🥷 STARTUP BYNINJA TRADING BOT v0.1.0
TradingBot - DEBUG - 🔍 Intelligent monitoring for AVAXUSDT
TradingBot - DEBUG - 🔍 Intelligent monitoring for LINKUSDT
TradingBot - DEBUG - 🔍 Intelligent monitoring for DOTUSDT
TradingBot - DEBUG - 🔍 Intelligent monitoring for XRPUSDT
TradingBot - INFO - 📊 Started monitoring for:
   - AVAXUSDT
   - LINKUSDT
   - DOTUSDT
   - XRPUSDT
   - ATOMUSDT
TradingBot - DEBUG - 🔍 Intelligent monitoring for ATOMUSDT
TradingBot - DEBUG - ✅ All systems started. Bot is active.
TradingBot - DEBUG - 💡 Bot active. Press Ctrl+C to stop.
TradingBot - DEBUG - 💰 Balance: USDT=$32024.00, assets: 230

3. Aktive Überwachung & Handel

Sobald der Trading Bot aktiv ist, überwacht er kontinuierlich Ihre angegebenen Paare auf EMA-Cross-Signale, analysiert Volumenspitzen und führt Trades mit höchster Präzision aus. Sie sehen Marktanalyse-Protokolle in Echtzeit.

Code
TradingBot - DEBUG - DOTUSDT   | ENTRY | $  1.2370 | S200 -0.004%>-0.008% 🟢 | S50 -0.012%>+0.005% 🔴 | S20 -0.004%>+0.010% 🔴 | D200/50 -0.145%>+0.060% 🔴 | D50/20 -0.123%>+0.080% 🔴 | Vol  0.1x>1.2x 🔴
TradingBot - DEBUG - XRPUSDT   | EXIT  | $  1.3913 | PnL: +0.24% 🟢 | TS: +0.06% | TP: +2.30% | SL: -1.15% | Time: 05:07:27
TradingBot - DEBUG - ATOMUSDT  | ENTRY | $  1.9630 | S200 -0.015%>-0.008% 🔴 | S50 -0.018%>+0.005% 🔴 | S20 -0.024%>+0.010% 🔴 | D200/50 -0.322%>+0.070% 🔴 | D50/20 -0.102%>+0.110% 🔴 | Vol  0.3x>1.2x 🔴
TradingBot - DEBUG - DOTUSDT   | ENTRY | $  1.2370 | S200 -0.004%>-0.008% 🟢 | S50 -0.012%>+0.005% 🔴 | S20 -0.004%>+0.010% 🔴 | D200/50 -0.145%>+0.060% 🔴 | D50/20 -0.123%>+0.080% 🔴 | Vol  0.1x>1.2x 🔴
TradingBot - DEBUG - LINKUSDT  | ENTRY | $  9.2800 | S200 -0.009%>-0.008% 🔴 | S50 -0.015%>+0.005% 🔴 | S20 -0.017%>+0.010% 🔴 | D200/50 -0.226%>+0.060% 🔴 | D50/20 -0.104%>+0.090% 🔴 | Vol  0.0x>1.2x 🔴
TradingBot - DEBUG - XRPUSDT   | EXIT  | $  1.3913 | PnL: +0.24% 🟢 | TS: +0.06% | TP: +2.30% | SL: -1.15% | Time: 05:07:28
TradingBot - DEBUG - AVAXUSDT  | ENTRY | $  9.2700 | S200 +0.001%>-0.008% 🟢 | S50 -0.002%>+0.005% 🔴 | S20 +0.016%>+0.010% 🟢 | D200/50 -0.177%>+0.060% 🔴 | D50/20 -0.102%>+0.100% 🔴 | Vol  2.6x>1.2x 🟢
TradingBot - DEBUG - LINKUSDT  | ENTRY | $  9.2800 | S200 -0.009%>-0.008% 🔴 | S50 -0.015%>+0.005% 🔴 | S20 -0.017%>+0.010% 🔴 | D200/50 -0.226%>+0.060% 🔴 | D50/20 -0.104%>+0.090% 🔴 | Vol  0.0x>1.2x 🔴
TradingBot - DEBUG - DOTUSDT   | ENTRY | $  1.2370 | S200 -0.004%>-0.008% 🟢 | S50 -0.012%>+0.005% 🔴 | S20 -0.004%>+0.010% 🔴 | D200/50 -0.145%>+0.060% 🔴 | D50/20 -0.123%>+0.080% 🔴 | Vol  0.1x>1.2x 🔴
TradingBot - DEBUG - AVAXUSDT  | ENTRY | $  9.2800 | S200 +0.002%>-0.008% 🟢 | S50 +0.002%>+0.005% 🔴 | S20 +0.026%>+0.010% 🟢 | D200/50 -0.174%>+0.060% 🔴 | D50/20 -0.096%>+0.100% 🔴 | Vol  2.6x>1.2x 🟢
TradingBot - DEBUG - XRPUSDT   | EXIT  | $  1.3914 | PnL: +0.25% 🟢 | TS: +0.06% | TP: +2.30% | SL: -1.15% | Time: 05:07:57
TradingBot - DEBUG - ATOMUSDT  | ENTRY | $  1.9630 | S200 -0.015%>-0.008% 🔴 | S50 -0.018%>+0.005% 🔴 | S20 -0.024%>+0.010% 🔴 | D200/50 -0.322%>+0.070% 🔴 | D50/20 -0.102%>+0.110% 🔴 | Vol  0.3x>1.2x 🔴
TradingBot - DEBUG - LINKUSDT  | ENTRY | $  9.2900 | S200 -0.008%>-0.008% 🟢 | S50 -0.010%>+0.005% 🔴 | S20 -0.005%>+0.010% 🔴 | D200/50 -0.229%>+0.060% 🔴 | D50/20 -0.098%>+0.090% 🔴 | Vol  0.0x>1.2x 🔴
TradingBot - DEBUG - XRPUSDT   | EXIT  | $  1.3913 | PnL: +0.24% 🟢 | TS: +0.06% | TP: +2.30% | SL: -1.15% | Time: 05:08:27
TradingBot - DEBUG - AVAXUSDT  | ENTRY | $  9.2700 | S200 +0.004%>-0.008% 🟢 | S50 +0.002%>+0.005% 🔴 | S20 +0.024%>+0.010% 🟢 | D200/50 -0.175%>+0.060% 🔴 | D50/20 -0.088%>+0.100% 🔴 | Vol  0.5x>1.2x 🔴