The Forex trade result consists of the difference between the opening price and the closing price of the asset. In long trading, the trader earns a profit from the price’s growth. The short trading is the opposite, with the profit earned from the lowering of the price.
A simple formula will help you with that:
(Difference between the opening and closing of the trade / Current price) * Investment’s volume * Multiplier - Commission = Profit.
For example, a trader opened a long trade for USD/JPY. The opening price is 105,000. The closing price is 105,500. $100 was invested. Multiplier equals x500. Just like that, the trade volume is $50,000, with the opening commission of $4.
((105.500 - 105.000) / 105.000) x 100 x 500 - 4 = $234
If the multiplier is x1, then you can skip the part with multiplying by it.