Energy stocks continued to claw their way out of the doldrums on Wednesday, boosted by a three-day rally that pushed oil prices to their highest levels since late 2014.

A closely-followed fund that tracks energy stocks and the S&P 500 energy sector were both up about 1 percent on Wednesday and poised to rise out of correction territory for the first time in two months. They both fell 10 percent from their 52-week highs on Feb. 5, and have languished below that key level since then.

The Energy Select Sector SPDR ETF rose out of correction territory on an intraday basis earlier on Wednesday, but was on the razor's edge of ending the session still 10 percent below its 52-week high.

Meanwhile, the S&P 500 energy sector was trading about 9.6 percent below its 52-week high. Over the last week, the sector is up about 4.7 percent and outpacing the other nine sectors in the index.

Energy stocks have also broken out of a trading range closely followed by technicians, according to Roberto Friedlander, head of energy trading at Seaport Global Securities.

The S&P 500 energy sector on Tuesday breached the so-called Bollinger Bands, a range that attempts to indicate when prices are high or low. In this case, energy stocks rose above the upper band, signaling that prices are high compared to the average in recent weeks.

Breaking out of the Bollinger Bands doesn't send a clear buy or sell signal. But Friedlander identified 24 times the S&P 500 energy sector broke above the upper Bollinger Band since 1990 and found investor sentiment turned positive each time. In those instances, the sector generally rose 3 percent over the next three months, he said.

The bottom line, says Friedlander, is that buyers are returning to the sector.