No doubt about it, 2017 has been a tough year to be an energy investor.

Year-to-date oil prices have plunged double-digits and energy stocks have plummeted right alongside them. The big, popular Energy Select Sector SPDR ETF (XLE - Get Report) is down more than 11% since the start of the calendar year, underperforming the S&P 500 by more than 20%.

Energy stocks are down, but they're not out just yet.

Case in point: National Oilwell Varco Inc. (NOV - Get Report) .

National Oilwell Varco reported second-quarter earnings numbers after the bell Thursday, ending up with a 14-cent loss per share that just barely beat the 15 cent loss Wall Street analysts were looking for on average.

Despite the accounting numbers, management was positive on cash generation, with NOV's cash position boosted to $1.53 billion against $3.2 billion in debt. That balance sheet solidity, plus optimism over stabilizing oil prices, is driving a 4.5% pop on big volume in shares of NOV this afternoon.

But that short-term upside is just the beginning of the story.

National Oilwell Varco's Q2 earnings are serving as a catalyst for a potentially big technical breakout Friday. Here's how to trade it:

After correcting hard since March, National Oilwell Varco has been working to carve out a bottom, one that's finally about to trigger Friday.

The price pattern in NOV is a rounding bottom, a bullish reversal setup that looks just like it sounds. The rounding bottom indicates a gradual shift in control of shares from sellers to buyers, and it signals a buy when the resistance level that caps off the price pattern gets taken out. For NOV, that key price level to watch is $35, a level that's being tested in today's trading session.

What makes that $35 level so important for this stock? It all boils down to buyers and sellers.

The $35 resistance level is a price where there has been an excess of supply of shares; in other words, it's a spot where sellers have previously been more eager to step in and take gains than buyers have been to buy. That's what makes a breakout above $35 so significant -- the move means that buyers are finally strong enough to absorb all of the excess supply above that price level.

Momentum, measured by 14-day RSI up at the top of the chart, adds some extra confidence to the $35 breakout. That's because NOV's momentum gauge has been making higher lows since the start of May, an indication that buying pressure has been building as NOV consolidated sideways in its bottoming formation.

Simply put, if NOV holds above $35 into the close, it makes sense to buy shares of this energy stock for a rebound. The 50-day moving average has recently started acting like support; that makes it a logical place to park a protective stop.

More of What's Trending on TheStreet:

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