Compare commits

...

1 Commits

4 changed files with 3 additions and 2 deletions

View File

@ -113,6 +113,7 @@ class MLTradingBot:
# Track open positions # Track open positions
self.current_trades = {} # CLEAN START - reset on bot restart 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)') 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 = { completed = {
'pair': pair, 'pair': pair,
'qty': qty, 'qty': qty,
'entry_price': entry.get('entry_price', 0), 'entry_price': entry.get('buy_price', entry.get('entry_price', 0)),
'exit_price': price, 'exit_price': price,
'profit_usd': profit_usd, 'profit_usd': profit_usd,
'profit_pct': profit_pct, 'profit_pct': profit_pct,
'hold_time_min': hold_time_min, '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() 'exit_time': datetime.now().isoformat()
} }