How do we calculate profit and loss?
Profit and Loss:
PnL = (Exit Price – Entry Price) x Quantity
Unrealized Profit and Loss is the current profit or loss of an open position. The unrealized PnL is a reflection of what profit or loss could be realized if the position was closed at this time. The PnL does not become realized until the position is closed. If you sum Unrealized PnL from all your positions and then subtract from your Balance value you will get Equity value.
Realized PnL occurs when a trader closes part of the position profit and loss.