Are you ready for a market decline? Your strategy depends on how close you are to retirement.