Stabilizing unstable markets: an equation-free approach for agent-based models