Sure, this way, you buy at a higher price and pay more. But the fact that the resistance has been broken just moments ago makes it much more likely that the price will keep going up, while before there was a good chance, it will reverse and go back down again after touching the resistance.