feat: add patrimônio and dias rodando to portfolio header
This commit is contained in:
@@ -436,6 +436,13 @@ function loadPortfolio() {
|
||||
pnlEl.textContent = `P&L: ${pnl >= 0 ? '+' : ''}$${pnl.toLocaleString('pt-BR',{minimumFractionDigits:2})} (${pnlPct >= 0 ? '+' : ''}${pnlPct.toFixed(1)}%)`;
|
||||
pnlEl.style.color = pnl >= 0 ? '#69f0ae' : '#ff6b6b';
|
||||
document.getElementById('pfTrades').textContent = `${trades} trades | ${wins}W/${losses}L | WR: ${wr}%`;
|
||||
|
||||
const total = data.total_value || init;
|
||||
const daysRunning = data.chart_data ? data.chart_data.length : 0;
|
||||
const pfTotalEl = document.getElementById('pfTotal');
|
||||
if (pfTotalEl) pfTotalEl.textContent = `Patrimônio: $${total.toLocaleString('pt-BR', {minimumFractionDigits:2})}`;
|
||||
const pfDaysEl = document.getElementById('pfDays');
|
||||
if (pfDaysEl) pfDaysEl.textContent = `Dias Rodando: ${daysRunning}`;
|
||||
|
||||
// Draw chart
|
||||
drawChart(data.chart_data || [], init, bal);
|
||||
|
||||
Reference in New Issue
Block a user