The dollar tends to record a third weekly gain