What's wrong here? As long as you are investing money that you can afford to lose, the there is nothing wrong with buying. Keep buying! You won't regret on the long run. Just don't sell when the market is crashing.
The problem is that people will panic when the market starts crashing and probably they will be selling at a loss. If you have a long plan then it is good to wait for the market to go down and then invest for the long term rather than investing when the market is rallying and if you are planning to make a decent profit it is the best solution and the risk is lower as wel.