Resolve position average entry from CTP trades and PnL instead of stale monitor cache.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -832,15 +832,12 @@
|
||||
if (isPhoneLayout() && posMobileCache[key]) {
|
||||
var cached = posMobileCache[key];
|
||||
if (q.mark_price != null) cached.current_price = q.mark_price;
|
||||
if (q.entry_price != null) cached.entry_price = q.entry_price;
|
||||
if (q.float_pnl != null) cached.float_pnl = q.float_pnl;
|
||||
}
|
||||
var row = findPosRow(key);
|
||||
if (!row) return;
|
||||
var entryEl = row.querySelector('.dash-p-entry');
|
||||
var markEl = row.querySelector('.dash-p-mark');
|
||||
var pnlEl = row.querySelector('.dash-p-pnl');
|
||||
if (entryEl && q.entry_price != null) entryEl.textContent = fmtNum(q.entry_price);
|
||||
if (markEl && q.mark_price != null) markEl.textContent = fmtNum(q.mark_price);
|
||||
if (pnlEl && q.float_pnl != null) {
|
||||
pnlEl.textContent = fmtPnl(q.float_pnl);
|
||||
|
||||
Reference in New Issue
Block a user