Unrealised P&L is the positions' unrealised P&L.
Under the FIFO:
Unrealised P&L=(market price-cost )*open position qty
Cost=∑(buy amount + fee)/positions number, FIFO, priority in selling first open stocks
Under the avg cost:
Unrealised P&L=(market price-avg price )*open position qty
Avg price=∑(Total purchase amount)/position qty, the Avg cost algorithm only considers buying and does not consider selling changes
Total unrealised P&L of account = the sum of unrealised P&L of all the positions
Reminder: this formula is for reference only, please refer to the assets.