It's been a tough year for Tesla Inc. (TSLA) investors.

After posting a major rally in the first five months of 2017, Tesla's stock price has languished. Shares are down almost 9% year-to-date, and about 10% in the trailing 12 months. That's versus an S&P 500 that's up about 15% on a total returns basis since this time last year.

That recent bout of underperformance has painted a huge target on Tesla's back.

After all, Tesla has had perennially substantial short interest since it first entered the public markets back in 2010. This year, shorts have doubled down in a major way, enough to make Tesla the most heavily shorted stock in the market.

But Tesla's recent weak performance could really just be a matter of context. On both long-term and short-term timeframes, Tesla actually looks significantly more bullish than most investors realize -- and one chart gives some guidance as to when shares could start crushing the S&P 500 once again.

To figure it out, we're turning to the charts for a technical look.

First, the ultra-long-term time horizon:

The chart above shows Tesla's weekly price action stretching all the way back to 2012.

It doesn't take a trading whiz to see that, long-term, shares of Tesla have been pointing up and to the right. Even discounting the explosive, near-vertical momentum that shares experienced at the start of 2013, thanks to a combination of a buoyant equity market and the successful launch of the Model S sedan, the uptrend in Tesla has been hard to miss.

More importantly, that trend has been inviolate stretching all the way back to the summer of 2013.

Simply put, every time this stock has corrected down to trendline support buyers have stepped in to bid shares higher.

One of the most important takeaways from Tesla's weekly chart is relative strength, the indicator down at the bottom of the graphic. Relative strength measures Tesla's performance versus the broad market; the fact that it's been in an uptrend of its own since 2013 is a signal that Tesla hasn't just been a strong performer, it's been systematically outperforming the rest of the market over the long-run.

As Tesla's relative strength line tests its own uptrend for the fifth time in as many years, the clear takeaway is that Tesla could be about to start beating the rest of the S&P 500 once again.

This is the first time we've seen this setup in Tesla since November 2016.

We'll zoom into a shorter-term daily chart to see how it's likely to happen:

Most investors remain fixated on the intermediate-term trend (in red in the chart above) that's harangued shares of Tesla since the middle of last year. Meanwhile, shares have been looking constructive at lower levels, forming an unconventional ascending triangle pattern with a breakout level at $310.

Simply put, $310 remains the line in the sand that Tesla needs to push above in order to keep its short-term momentum afloat. And a $310 breakout by this summer jives with the longer-term relative strength trend that Tesla's been exhibiting since 2013.

With shares getting squeezed closer to that level as the price setup progresses, we'll find out soon whether that happens, or whether the price setup gets broken. Either way, it's worth keeping a very close eye on from here.

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

More from Investing

3 Things Investors Can Do to Stay Strategic When the Market's Volatile

3 Things Investors Can Do to Stay Strategic When the Market's Volatile

How to Be a Tactical Investor in the Current Market

How to Be a Tactical Investor in the Current Market

Canopy Growth CEO: Here's What the Future of Cannabis Looks Like for Investors

Canopy Growth CEO: Here's What the Future of Cannabis Looks Like for Investors

A Guide to Investing in the Fast-Emerging Cannabis Industry

A Guide to Investing in the Fast-Emerging Cannabis Industry

Canopy's CEO and Constellation Brands COO Discuss the Many Uses of Cannabis

Canopy's CEO and Constellation Brands COO Discuss the Many Uses of Cannabis