As a beginner I often made the same mistake but what I learned is to divide my money in to three phases and buy at peak, middle and low positions. So my loss will be compensated.