To calculate the profit or loss of a position:
BUY Positions
Profit = (Closing Price – Opening Price) * Volume
SELL Positions
Profit = (Opening Price – Closing Price) * Volume
Keep in mind that the profit is calculated on the quote currency, and you will need to multiply the exchange rate between the quote currency of the traded pair and the account base currency.
Example 1:
Account Currency: USD
Position: BUY 1.00 lot EURUSD.
Opening Price: 1.14000
Closing Price: 1.14500
Volume: 100,000
Exchange rate to USD = 1
Profit = (1.1450 – 1.1400) * 100,000 = 500 USD
Example 2:
Account Currency: USD
Position: SELL 0.10 lot USDCAD
Opening Price: 1.3400
Closing Price: 1.3380
Volume: 10,000
Exchange rate CAD to USD: 0.747
Profit = (1.3400 – 1.3380) *100,000 = 200 CAD
Profit = 200 * 0.747 = 149.4 USD