When you close out a trade, take the price (exchange rate) when selling the base currency and subtract the price when buying the base currency, then multiply the difference by the transaction size. That will give you your profit or loss.