Bot auto-update: src/__pycache__/main_ml.cpython-310.pyc,src/main_ml.py

This commit is contained in:
Marc Blatter 2026-07-06 21:20:01 +02:00
parent a815dfe304
commit 0e3bcff00e
2 changed files with 8 additions and 9 deletions

View File

@ -31,8 +31,8 @@ class TradingBot:
self.PAIRS = ['BTCUSDT', 'ETHUSDT', 'SOLUSDT', 'BNBUSDT', 'XRPUSDT']
self.SIGNAL_THRESHOLD = 5 # 5% random signal
self.INVESTMENT_PERCENT = 50 # 50% per trade (5 parallel = 90% max, 10% buffer)
self.NOTIONAL_MIN = 3.0 # Binance minimum (reduced from 5)
self.INVESTMENT_PERCENT = 35 # 35% per trade (5 parallel = 90% max, 10% buffer)
self.NOTIONAL_MIN = 5.0 # Override Binance minimum to $3
self.STOP_LOSS_PERCENT = 2.5 # -2.5%
self.TAKE_PROFIT_PERCENT = 3.0 # +3%
self.DAILY_LOSS_LIMIT = -5 # -5% max
@ -186,7 +186,6 @@ Reports: Alle 3h via Telegram 📊"""
account = self.client.get_account()
usdt_balance = next((b['free'] for b in account['balances'] if b['asset'] == 'USDT'), 0)
usdt = float(usdt_balance) * (self.INVESTMENT_PERCENT / 100)
self.NOTIONAL_MIN = 3.0 # Binance minimum (reduced from 5)
qty = usdt / entry_price
@ -198,16 +197,16 @@ Reports: Alle 3h via Telegram 📊"""
logger.warning(f"Quantity too small for {pair}: {qty}")
return False
# VALIDATE NOTIONAL (order_value must be >= min_notional)
min_notional = self.pair_precision.get(pair, {}).get('min_notional', 10.0)
# VALIDATE NOTIONAL (order_value must be >= 3.0 MINIMUM)
order_value = qty * entry_price
NOTIONAL_MIN = 5.0 # Minimum $3
# Override min_notional to 3.0 for better trading
notional_threshold = 3.0 # Override Binance minimum to $3 for better trading
if order_value < notional_threshold:
logger.warning(f"Order value too small {pair}: ${order_value:.2f} < ${notional_threshold:.2f}")
if order_value < NOTIONAL_MIN:
logger.warning(f"Order value too small {pair}: ${order_value:.2f} < ${NOTIONAL_MIN:.2f} (qty={qty}, price={entry_price})")
return False
logger.info(f"✅ NOTIONAL Check Passed: {pair} ${order_value:.2f} >= ${NOTIONAL_MIN:.2f}")
# Place market buy
order = self.client.order_market_buy(symbol=pair, quantity=qty)
logger.info(f"🟢 BUY: {pair} x{qty} @ ${entry_price:.2f} (value: ${order_value:.2f})")