Swap is the interest adjustment applied to a position held open past the end of the trading day. In forex, a position is a loan of one currency funded by the other, and the difference between the two currencies' interest rates is credited or charged each night. Brokers add a markup, so the charge is usually larger and the credit smaller than the raw rate difference would suggest.
For index and gold CFDs there is no pair of interest rates. The swap reflects the cost of financing the position, adjusted for dividends on indices, and it is almost always a charge on both long and short positions.
When swap is applied
Swap is applied at the broker's rollover time, usually 10pm UK time, corresponding to 5pm in New York. A position open at that moment is charged or credited for one day. Positions opened and closed within the day pay no swap at all.
Because the weekend has no rollover, the two weekend days are charged in advance on one weekday, which is why one day each week carries a triple swap. For most currency pairs that day is Wednesday. For indices, metals and other CFDs it is often Friday. The contract specification in MetaTrader 5 states the swap rates for long and short positions and the day on which the triple charge applies.
Reading the swap rate
Swap is quoted either in points or in a percentage, per lot, per night. A rate shown as -7.2 points on a long position means that each night a one-lot long position is charged 7.2 points, which on a five-decimal pair is 0.72 pips, or about $7.20 on EUR/USD. A positive figure is a credit. Long positions in the higher-yielding currency of a pair usually earn a credit and short positions pay a charge, though the broker's markup means both sides can be negative.
You hold one lot of gold long for three weeks at a swap of -$25 per lot per night, with the triple charge on Friday. That is 21 nights, of which three are Fridays counted triple, 15 ordinary nights plus 3 Fridays at 3 each, 24 swap units, about $600. If the position earned $1,500 from the price move, swap took 40 per cent of it. On a position held for two days, swap would have been $50 and hardly worth considering.
An account designated swap-free, sometimes called an Islamic account, applies no overnight interest but often replaces it with an administration fee after a set number of days, so it is not necessarily cheaper for long holds.
Swap is irrelevant to a strategy that closes its positions within the day and a significant cost to one that holds for weeks. An EA that trades on daily or weekly charts should account for swap in its expectations, and a vendor's backtest should say whether it included swap at all, since many testing platforms ignore it by default. A weekly strategy in a pair with a large negative swap can see a good share of its gross profit paid back in overnight charges.
The practical checks are simple. Look at the swap rates for the markets an EA trades in the contract specification of your broker, note the triple-swap day, and compare the EA's typical holding period from its live record with the nightly cost. If a strategy routinely holds through the triple day on an instrument with a heavy charge, that cost belongs in your assessment of it. Some EAs allow the trader to avoid opening positions immediately before the triple-swap rollover, but for a strategy whose edge depends on holding through a move, avoiding a night's swap is not worth missing the move.