Let's say my home currency is USD, but I'm trading a pair of two foreign currencies, e.g. EUR / GBP.
Let's say I open a position by entering a long EUR/ short GBP position; I can represent my position as (x0 EUR, -y0 GBP), with x0, y0 both positive numbers.
Later I partially close the position at a profit (for simplicity let's assume that all three exchange rates (EUR/GBP, EUR/USD, GBP/USD) have moved in my favor), so that my position is now (x1 EUR, -y1 GBP). How would I calculate Realized PnL in USD, given x0, y0, x1, y1, and the three exchange rates EUR/GBP, EUR/USD, GBP/USD at the time of opening and at the time of the second transaction?
The reason it's not obvious to me is that it's unclear to me how to determine what closes a position: e.g. starting with (x0 EUR, -y0 GBP) and having the EUR/GBP rate move in my favor means I could close my position either to (x1 EUR, 0 GBP), or (0 EUR, y1 GBP), depending on whether we think about closing the long position, or closing the short position. Is there any standard practice way of calculating what a closed position is in this case (closing the long or closing the short), or is there a third way of calculating Realized PnL in USD that is symmetrical in this sense?