CRITICAL FIX: Convert AI absolute prices to percentages for stop loss/take profit

system was treating them as percentages (530.13%), causing ridiculous targets

 SOLUTION:
- calculateStopLoss(): Convert AI absolute stopLoss.price to percentage
- calculateTakeProfit(): Convert AI absolute takeProfits.tp1.price to percentage
- Proper calculation: ((targetPrice - currentPrice) / currentPrice) * 100

- Before: SOL @85 → TP: 530.13% = ,152 🤯
- After:  SOL @85 → TP: 2.8% = 90 

This ensures scalping trades have realistic targets instead of 500%+ gains.
This commit is contained in:
mindesbunister
2025-07-24 11:35:57 +02:00
parent 04e1610806
commit 1cbed61a46
2 changed files with 22 additions and 38 deletions

Binary file not shown.