Open the Orders, Positions, and Executions panel, and locate the trade you want to close.
Click on the Close button.
You will be prompted to enter a value for the portion that is to be closed. Trades can be closed fully or partially. In this example, full position size is 1 BTC. You can choose a number smaller than 1 to close partially, or 1 to close all of the trade. Realized P&L and any unrealized P&L will be adjusted accordingly.
Let's close the full trade, or 1 BTC. As 1 is already input here by default, just click on the check symbol. System will ask you to confirm again. Click Yes to continue, or No to go back.
The trade has been closed. Unrealized P&L of -$11.30 is now realized into an actual loss of -$11.30.
When you close a trade, what actually happens behind the scene is that system places another order in the opposite side of the first order you placed. This order is also called settlement order, or the trade closing order. Therefore, in the Orders panel on top, you will see another order being logged. Note that slippage can always happen.
In the Transactions panel, you can see that some more transactions belonging to the margin type have been added.