The Australian sharemarket has broken its three-day losing streak with Nufarm and Xero posting the biggest gains.