Add 'Clear Manual Closes' button to analytics

- New button in analytics page to clear orphaned trades
- API endpoint /api/trading/clear-manual-closes
- Intelligently checks Drift positions before deleting
- Only removes trades with no matching position or mismatched entry price
- Safe operation: keeps trades on error (false positives better than deletions)
- User-friendly confirmation dialog
This commit is contained in:
mindesbunister
2025-11-01 02:41:26 +01:00
parent c82da51bdc
commit 49a09ef04e
3 changed files with 139 additions and 2 deletions

2
.env
View File

@@ -352,4 +352,4 @@ NEW_RELIC_LICENSE_KEY=
USE_TRAILING_STOP=true
TRAILING_STOP_PERCENT=0.3
TRAILING_STOP_ACTIVATION=0.5
MIN_QUALITY_SCORE=40
MIN_QUALITY_SCORE=50