Shares of cloud storage company Rackspace Hosting (RAX) have surged about 24% since falling to a low of $20.49 on May 10. This includes 8.8% gains in the past couple of weeks.

During the span, Rackspace stock, which has tested resistance at around $25 per share, has reclaimed all three key moving averages. And with the company's earnings now out of the way, Rackspace's stock chart now points to more gains up ahead. The charts suggest the stock could gain 7% in the next couple weeks, making it a solid buying opportunity now.

Rackspace shares closed Friday at $24.58, down 1.52%. The shares are have declined 2.52% so far on the year, compared with a 2.7% rise in the S&P 500 (SPX) index.

As far as fundamentals go, based on fiscal 2016 estimates of $1.09 per share, Rackspace is priced at 22 times forward estimates. While Rackspace's forward price-to-earnings ratio is five points above the S&P 500 index's P/E of 17, the $1.09 estimate implies 21% year-over-year earnings growth, or about four times the S&P 500 index's projected growth rate. What's more, fiscal 2017's estimate of $1.18 per share implies earnings growth of 8.25%, amounting to 15% earnings growth on a two-year average.

TheStreet Recommends

From a technical perspective, Rackspace stock has shown a noticeable pattern. Take a look at the chart below, courtesy of TradingView.

Image placeholder title

There's several ways to asses where Rackspace stock may land next. Wall Street's view of the stock remains a factor to consider. The shares have a consensus hold rating and an average 12-month price target of $23. But the chart above shows Rackspace stock is no longer broken. And as you can see from the three black arrows above, the stock has reversed course with each of the last three declines. At the same time, it has created a higher high with each recovery. This time won't likely be any different.

The blue arrow, above, marks the resistance level at around $25.33. Rackspace stock has only just regained its level from the peak in April; the pink circles mark these peaks. If the stock keeps the same pattern, Rackspace stock could not only break resistance at $25.33, the stock could breach second-level resistance (the red line) at $26.30.

This article is commentary by an independent contributor. At the time of publication, the author held no positions in the stocks mentioned.