           }
                            }
                            
                            // 處理損益
                            let displayProfit = 'N/A';
                            let profitClass = '';
                            if (position.realizedProfit !== null && position.realizedProfit !== undefined && position.action === 'CLOSE') {
                                try {
                                    const profitValue = parseFloat(position.realizedProfit);
                    