y.filter(position => position && position.symbol === asset2);
                        updateAssetHistory(asset2, asset2History, '#asset2HistoryBody', '#asset2Count');
                        
                        // 計算總損益和勝率
                        calculateTotalProfitAndWinRate(allHistory);
                    } else {
                        console.error('獲取歷史倉位失敗:', response ? response.message : '未知錯誤');
                        showToast('error', '獲取倉位�