For ease of use, most online trading platforms automatically calculate the P&L of a traders' open positions. However, it is useful to understand how this calculation is formulated:
To illustrate an FX trade, consider the following two examples.
Let's say that the current bid/ask for EUR/USD is 1.46160/190, meaning you can buy 1 euro for 1.46190 or sell 1 euro for 1.46160. Suppose you decide that the Euro is undervalued against the US dollar. To execute this strategy, you would buy Euros (simultaneously selling dollars), and then wait for the exchange rate to rise. So you make the trade: to buy 100,000 Euros you pay 146,190 dollars (100,000 x 1.46190). Remember, at 1% margin, your initial margin deposit would be approximately $1,461 for this trade. As you expected, Euro strengthens to 1.46230/260. Now, to realize your profits, you sell 100,000 Euros at the current rate of 1.46230, and receive $146,230 You bought 100k Euros at 1.46190, paying $146,190. Then you sold 100k Euros at 1.46230, receiving $146,230. That's a difference of 4 pips, or in dollar terms ($146,190 - 146,230 = $40). Total profit = US $40. Now in the example, let's say that we once again buy EUR/USD when trading at 1.46160/190. You buy 100,000 Euros you pay 146,190 dollars (100,000 x 1.46190). However, Euro weakens to 1.46110/140. Now, to minimize your loses to sell 100,000 Euros at 1.46110 and receive $146,110. You bought 100k Euros at 1.46190, paying $146,190. You sold 100k Euros at 1.46110, receiving $146,110. That's a difference of 8 pips, or in dollar terms ($146,190 - $146,110 = $80). Total loss = US $80.