Regular investing can result in you buying when prices are both high and low