Today's profit and loss = today's liquidation profit and loss+historical position profit and loss. Historical position profit and loss = (today's settlement price-yesterday's settlement price) * number of positions.
You can calculate the balance of the settlement reserve for the day as follows: initial investment in the account+total amount of money you earn-the deposit occupied by the position on the day.
You can use your historical profit and loss+two liquidation profits and losses to calculate the total amount of money you earn.