Bug: Position Manager was comparing ANY position on the symbol to the trade being tracked, without verifying entry price match. When a new position opened, it would think the old tracked trade 'closed externally' and cancel ALL orders - including the new position's exit orders. Fix: Added entry price verification (0.5% tolerance). If position entry price doesn't match the tracked trade, mark the old trade as 'lost tracking' and remove from monitoring WITHOUT cancelling orders (they belong to the new position). This prevents the catastrophic scenario where exit orders are repeatedly cancelled, leaving positions unprotected.
25 KiB
25 KiB