Files
trading_bot_v4/app/api/withdrawals
mindesbunister d8b0307e74 fix: Use database realizedPnL instead of recalculating from entry/exit
Stats API was recalculating P&L from entry/exit prices which didn't
account for TP1+runner partial closes. This caused incorrect P&L
display (-$26.10 instead of +$46.97).

Fixed:
- Use database realizedPnL (now corrected to match Drift UI)
- Added debug logging to show trade count and total
- Stats now correctly show v8 performance: +$46.97

Note: Database P&L values were corrected in previous commit (cd6f590)
to match Drift UI's actual TP1+runner close values.
2025-11-19 21:53:13 +01:00
..