The calculation is made as follows: Interest rate (%) x Contract value (contract value is equal to daily close price multiplied by contract size) / 360 = Overnight finance fee.
Please note that the swap amount may be debited or credited to your account depending on the interest rate value of the traded product.Final amount will be converted to your account base currency if it is not USD.
Example: EURUSD pair has 1.25 % interest value for the short (SELL) trades , keeping open trades overnight will have positive swap and your account will be credited according to your trade size.Lets consider you have opened 1 lot EURUSD sell trade and kept it overnight and closing price when the day changed was 1.1450.
1.25 % x (100.000 * 1.1450) / 360 = 3.98 $ credit per night