Immigration also increases the size of the economy, so wages are not necessarily affected in direct proportion. There is the question of existing demand for labor (there may be a relative shortage) and where the labor goes/is needed. But as the economy grows more jobs are created, and the economy may become more productive.
If the economy is bad you'll get also emigration to some extent.