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.