For most brokers swap (carry) is done at the end of the day, so if you close out a position before day's end you'll avoid it. OANDA calculates carry continuously, though, so you would pay/receive it no matter when during the day you close out a trade (for open positions it's paid/charged at day's end like everyone else).