In the international forex cash market (known as the Spot Market) currencies are traded in pairs. The first currency in each pair is known as the Transaction Currency, while the second currency in the pair is the Settlement Currency. The quantity bought and sold will apply directly to the Transaction Currency, while the gains and losses from transactions will apply to the Settlement Currency. When you buy a currency pair you are going long the Transaction Currency while simultaneously shorting the Settlement Currency. Conversely, when you sell a currency pair you are shorting the Transaction Currency while simultaneously buying the Settlement Currency. Since the forex market is foreign exchange, each transaction must contain one currency against another.
We'll work through an example, using EUR.USD as our currency pair, with 100,000 being the quantity. In this example, EUR is the Transaction Currency. USD is the Settlement Currency. Buying 100,000 EUR.USD would mean that you are going long or buying EUR 100,000, while simultaneously shorting/selling 100,000 EUR worth of USD at the present exchange rate which exists in the interbank market. If you were to close this position by selling 100,000 EUR.USD, then you would close or go "flat" EUR.USD. However, any profit or loss on this transaction would settle in USD, since it is the Settlement Currency. Therefore, you be left with a positive or negative balance in USD as a result of this transaction. The inverse would be true if the initiating trade was a sell of EUR.USD.