Traders turned positive on the US dollar for the first time this year as war in the Middle East jolts energy costs higher and supports the currency’s status as a haven.