Fix float P/L when using OpenCost entry and clear CTP hint on connect.
Recalculate position quotes from resolved entry instead of stale CTP PositionProfit, and hide the auto-connect disabled banner once CTP is connected. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -299,14 +299,16 @@
|
||||
syncBadge.textContent = '';
|
||||
}
|
||||
}
|
||||
if (!connected && !connecting && data.ctp_status && data.ctp_status.last_error) {
|
||||
if (connected) {
|
||||
showCtpError('');
|
||||
} else if (!connecting && data.ctp_status && data.ctp_status.last_error) {
|
||||
showCtpError(data.ctp_status.last_error);
|
||||
if (isCtpLoginBanError(data.ctp_status.last_error)) {
|
||||
lastCtpLoginBanAt = Date.now();
|
||||
} else if (isCtpUnreachableError(data.ctp_status.last_error)) {
|
||||
lastCtpUnreachableAt = Date.now();
|
||||
}
|
||||
} else if (!connected && data.ctp_status && data.ctp_status.disabled_hint) {
|
||||
} else if (!connecting && data.ctp_status && data.ctp_status.disabled_hint) {
|
||||
showCtpError(data.ctp_status.disabled_hint);
|
||||
}
|
||||
var riskBadge = document.getElementById('risk-badge');
|
||||
|
||||
Reference in New Issue
Block a user