When the market is res or green? I would say green... you want to have your coins when the market picks back up right?
I think most ICOs adjust the number of the coins you can get depending on the time you bought the coins and the time the sale is over or the tokens are sent. So, there's nothing to worry. In terms of timing to buy, you should buy as early as you can because most ICOs offer bigger discounts or additional coins during the early sale. So, you better not miss out on this.