se {
                winRateElement.removeClass('text-success text-warning text-danger').addClass('text-danger');
            }
        }

        // 隱藏提示框
        function hideToast() {
            const toast = $('#resultToast');
            const bsToast = bootstrap.Toast.getInstance(toast);
            if (bsToast) {
                bsToast.hide();
            }
        }

        // 更新特定交易對的歷史記錄表格
        function updateAssetHistory(asset, history, tableSelector, c