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

This commit is contained in:
Marc Blatter 2026-07-04 14:55:01 +02:00
parent f8d028a3a5
commit 2dbca544b9
4 changed files with 3 additions and 2 deletions

View File

@ -113,6 +113,7 @@ class MLTradingBot:
# Track open positions
self.current_trades = {} # CLEAN START - reset on bot restart
self.pairs = ['BTCUSDT', 'ETHUSDT', 'SOLUSDT', 'BNBUSDT', 'XRPUSDT']
logger.info('🗑️ RESET: Cleared all stored positions (dashboard will show REAL Binance state only)')

View File

@ -144,12 +144,12 @@ async def record_sell(pair: str, qty: float, price: float, profit_usd: float, pr
completed = {
'pair': pair,
'qty': qty,
'entry_price': entry.get('entry_price', 0),
'entry_price': entry.get('buy_price', entry.get('entry_price', 0)),
'exit_price': price,
'profit_usd': profit_usd,
'profit_pct': profit_pct,
'hold_time_min': hold_time_min,
'entry_time': entry.get('entry_time', ''),
'entry_time': entry.get('buy_time', entry.get('entry_time', '')),
'exit_time': datetime.now().isoformat()
}