No doubt about it, 2017 has been a tough year for publicly traded Detroit automakers.

These engines are running rough.

While the big S&P 500 is up almost 10% on a total returns basis since the start of the calendar year, car makers Ford Motor Co. (F) - Get Reportand General Motors (GM) - Get Reportare both down this year, underperforming the rest of the S&P materially.

There is no shortage of reasons why investors should be skeptical of the auto industry right now. Between talk of "peak auto" slowing sales in car companies' biggest markets, corporate shakeups and continued earnings pressure from a hardy U.S. dollar, there are some good reasons to be careful about U.S. car stocks right now. In other words, the price action fits the narrative.

But if you're thinking about ignoring Ford and GM for the rest of the year, think again.

Chatter in the car industry this year is wrong. And, from a technical standpoint this summer, both of these Detroit car giants are both teetering on the edge of a major breakout.

All is not what it seems in the car industry right now. For starters, the underperformance Ford and GM have experienced in 2017 has been mostly limited to Ford and GM. While the massive 80% rally in Tesla Motors Inc. (TSLA) - Get Report might not exactly be a good comparison, the 16% up-move in Fiat Chrysler Automobiles (FCAU) - Get Report is.

In fact, the Nasdaq OMX Global Automobile Index is up almost 7% this year. The industry isn't reeling right now, even if Ford and GM's stock prices have been lagging.

That underperformance could actually create an opportunity for investors this summer as these stocks make up for lost time and play catch-up with the rest of the global auto industry.

Meanwhile, Jim Cramer talks about oversold retail stocks on Real Money. Get his insights or analysis with a free trial subscription to Real Money.

Looking at GM's stock chart, it's clear that a change is taking place:

Image placeholder title

Simply put, GM has spent the last couple of months trying to carve out a long-term bottom. The pattern in play for GM right now is an inverse head-and-shoulders setup, a bullish reversal pattern that indicates exhaustion among sellers.

The price setup is identified by two swing lows that bottom out at approximately the same level (the shoulders), separated by a lower low (the head). The buy signal gets triggered on a move through GM's neckline at $35 -- shares are within grabbing distance of that breakout level today.

Relative strength, the indicator down at the bottom of GM's price chart, adds some extra confidence to the GM trade right now. Relative strength measures GM's price performance vs. the rest of the broad market -- for most of 2017, the downtrend in that indicator signaled that GM was not a stock you wanted to own. But that changed in early June, when our relative strength indicator pushed through the top of that prior downtrend and started making a series of higher lows.

GM has been outperforming the rest of the market for almost a month -- and a breakout above $35 signals that there's a lot more upside ahead.

Meanwhile, Ford is showing off a very similar price setup right now:

Image placeholder title

Like GM, Ford has spent the last few months trying to form a long-term inverse head-and-shoulders pattern. That's not a big surprise -- these two Detroit auto stocks tend to correlate highly with one another, so long-term technical setups in one tend to be mirrored in the other. The key difference with Ford here is that it's a little further than GM from breakout territory, up at $11.40.

Still, the breakout implications are just the same. In Ford's case, a material push through the $11.40 level clears the way to prior highs up at $12.60. That's a 10% upside move before Ford hits any semblance of a price ceiling again.

The side-indicator to pay attention to in Ford right now is price momentum, measured by 14-day RSI up at the top of Ford's chart. Higher lows in RSI at the same time Ford's price action was carving out its inverse head-and-shoulders pattern is a bullish divergence that signals buyers are taking back control of Ford's stock this summer. Once shares move meaningfully through $11.40, it's time to buy this Detroit carmaker.

Visit here for the latest business headlines.

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