      try {
                                    const profitValue = parseFloat(position.realizedProfit);
                                    if (!isNaN(profitValue)) {
                                        displayProfit = profitValue.toFixed(4);
                                        profitClass = profitValue > 0 ? 'text-success' : profitValue < 0 ? 'text-danger' : '';
                                    }
                                } catch (e) {
                                    console.error('�