- Position Manager now detects TP1/TP2 fills by monitoring position size reductions instead of entry price mismatches - When position size reduces by ~75%, marks TP1 as filled and updates currentSize - When position size reduces by ~95%, marks TP2 as filled and activates trailing stop for 5% runner - Entry price mismatch check now skipped after TP fills (Drift shows weighted average entry price after partial closes) - Fixes bug where runners were incorrectly closed after TP1/TP2 fired on-chain - Adds grace period for new trades (<30s) to avoid false positives during blockchain propagation delays - This unblocks Phase 1 data collection for signal quality optimization (need 10+ trades with MAE/MFE data)
28 KiB
28 KiB