What is a swap/rollover?
Where a forex position is held at the close of business on a trading day, a ‘swap credit’ or a ‘swap charge’ will be made to any unrealised profit/loss. Essentially, any open positions are automatically rolled over to the next trading day while the swap is calculated.
Each currency has an interest rate component attached to it, and because forex is traded in currency pairs, every trade involves not only two different currencies but also two different interest rates. The swap rate accounts for the difference in the interest rates between the base currency and the terms currency when a forex position is held overnight (i.e. rolled over to the next business day).
To learn how swaps are calculated, refer to this article.