It's no secret that 2017 has been a tough year so far for energy sector investors.

Year-to-date, the Energy Select Sector SPDR ETF (XLE) , one of the most popular proxies for energy stocks as a group, is down almost 12%--that's almost 20% worse than the rest of the S&P 500's bullish run this year. Simply put, if you have exposure to energy right now, it's almost certainly been a drag on your portfolio's performance this year.

Even worse, the energy sector's year-to-date underperformance might not be the end of it. Some of the biggest energy stocks on the market have the potential to turn "toxic" this summer. So, to figure out which names to steer clear of, we're turning to the charts for a technical look at three big energy stocks that are teetering on the edge of breakdowns right now.

For the unfamiliar, technical analysis is a way for investors to quantify qualitative factors, such as investor psychology, based on a stock's price action and trends. Once the domain of cloistered trading teams on Wall Street, technicals can help top traders make consistently profitable trades and can aid fundamental investors in better entry and exit points.

Just so we're clear, the companies I'm talking about today are hardly junk. But that's frankly irrelevant to what happens to their stocks; from a technical analysis standpoint, sellers are shoving around these toxic stocks right now.

For that reason, fundamental investors need to decide how long they're willing to take the pain if they want to hold onto these firms in the weeks and months ahead. And for investors looking to buy one of these positions, it makes sense to wait for more favorable technical conditions (and a lower share price) before piling in.

Without further ado, let's take a look at three "toxic stocks" to sell--and when to sell them.

Chevron Corp.

Leading things off is one of the biggest stocks in the sector: $197 billion oil and gas supermajor Chevron Corp. (CVX) . Chevron has basically kept pace with the rest of the sector so far this year--since the calendar flipped to January, Chevron's shares are down about 11%. The problem is that they could be about to kick off another leg lower.

That's because Chevron has spent the past month and change forming a descending triangle pattern, a bearish continuation setup that signals the possibility for more downside ahead. The pattern is formed by horizontal support down below shares, with downtrending resistance to the top-side. Basically, as CVX has pinballed between those two technically important price levels, shares have been getting squeezed closer and closer to a breakdown through our $104 support line. When that break happens, you don't want to own Chevron any more.

Another hint about pent up selling pressure in Chevron comes from its relative strength line, down at the bottom of the chart. Chevron's relative strength line has been making lower highs since the start of 2017, indicating that the underperformance is continuing into the summer. Buyer beware.

Imperial Oil Ltd.

Meanwhile, things are looking pretty straightforward in shares of $24 billion Canadian integrated oil company Imperial Oil Ltd. (IMO) . Unfortunately, they're not looking good. Since the middle of December, Imperial Oil has been selling off in a well-defined downtrend, shedding 22% of its market value along the way.

Now, as shares test the top of that price channel again, it makes sense to be a seller.

Imperial's downtrend is defined by a pair of parallel trendlines that have identified the high-probability range for shares to stay stuck within. So far, every test of the top of the price channel has been an opportunity to get out before the ensuing down-leg. The 50-day moving average is acting like a decent proxy for that bearish trendline right now, so as long as IMO stays below the 50-day, it makes sense to steer clear of shares.

Cimarex Energy Co.

Last on the list is $10 billion energy producer Cimarex Energy Co. (XEC) . Cimarex started the year pointing lower, but then it managed to consolidate sideways in a rectangle pattern for the past several months. Now, shares are initiating a new down leg this week.

The consolidation in Cimarex was a rectangle pattern, a price setup that gets its name because it basically "boxes in" shares of a stock. Consolidation patterns like that aren't uncommon following sharp price moves, like the selling at the start of 2017--they give buyers and sellers the chance to figure out their next steps.

Unfortunately for XEC, that next step is a selloff. Shares violated the bottom of the rectangle at $115 this week, opening up more downside risk in this stock. If you own shares, now looks like a good time to head for the exit until the selling subsides. Shares could be headed lower from here.

At the time of publication, the author had no positions in the stocks mentioned.

More from Stocks

Coke's a Better Stock to Buy Than Pepsi on Surprising North America Sales
Amazon Crushes Quarterly Earnings Estimates, Raises the Price of Prime

Amazon Crushes Quarterly Earnings Estimates, Raises the Price of Prime

Barbie Flexes Her Muscle in Mattel's Q1 Earnings

Barbie Flexes Her Muscle in Mattel's Q1 Earnings

Amazon Crushes First-Quarter Profit Estimates -- Watch TheStreet's Live Analysis

Amazon Crushes First-Quarter Profit Estimates -- Watch TheStreet's Live Analysis

Dow Jumps 238 Points as S&P 500, Nasdaq Also Climb

Dow Jumps 238 Points as S&P 500, Nasdaq Also Climb