It's the best of times and the worst of times for investors in 2017. In other words, we're in a Dickensian tale of two markets right now.

It's been easy to fixate on the positive lately. The big S&P 500 index hit new all-time highs last month, and it's been holding up just below those record levels without missing a beat. Meanwhile, a full third of the index's constituents are up 10% or more so far this year. That's a breakneck pace this early in the calendar year.

But, what many investors don't realize is that there's been a bearish flip side to those positive market stats.

For instance, while a big chunk of this market is "working" right now, an equally big chunk isn't. As I write, more than a third of the S&P's components are actually down since the start of the year. Of those, more than half are underperforming the big market average by 10% or worse.

The key to racking up some big gains in 2017 isn't in finding the very best stocks you should buy right now -- it's in avoiding the worst ones. So, today, we're taking a technical look at four stocks that could be ready to turn "toxic".

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.

By that, I mean they're not next up in line at bankruptcy court -- and many of them have very strong businesses. 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 four "toxic stocks" to sell and when to sell them.

GlaxoSmithKline plc

Up first on our list of potentially toxic trades is $98 billion healthcare stock GlaxoSmithKline plc (GSK) . GSK has actually been an attractive name to own lately. Shares are up about 10.6% since bottoming back in December, besting the S&P over that timeframe. But if you own GlaxoSmithKline, now's the time to start thinking about taking some of those recent gains off the table -- shares are looking "toppy" this spring.

Glaxo has spent the last couple of months forming a head-and-shoulders top, a classic bearish reversal setup that signals exhaustion among buyers. The pattern is identified by two swing highs that top out at approximately the same level (the shoulders), separated by a higher high (the head). The sell signal came earlier in the week, when GSK violated its neckline level at $41. That close below $41 opens up some meaningful downside risk from here.

The side-indicator to watch in shares of GSK is price momentum, measured by 14-day RSI at the top of this stock's chart. Our momentum gauge has made a series of lower highs since the pattern started forming, signaling that buyers have been losing control of things as shares have tracked sideways this spring. Caveat emptor.

AES Corp.

Meanwhile, things haven't looked great lately for shares of $7.5 billion electric utility AES Corp. (AES) . This big stock peaked back in late September, and it's lost about 14% of its market value in the intervening months. Now, a classic bearish continuation pattern is signaling the potential for another leg lower...

AES has spent all of 2017 forming a descending triangle setup, a bearish continuation pattern that's formed by horizontal support below $11 a share, and downtrending resistance to the top-side. Basically, as this stock has pinballed in between those two technically significant price levels, AES has been getting squeezed closer and closer to a breakdown through our $11 line in the sand. Once that happens, we've got our sell signal.

Relative strength, the indicator down at the bottom of AES' price chart, adds an extra red flag to this trading setup. That's because AES' relative strength line has been tumbling since last fall, indicating that this stock's underperformance is continuing into the spring. Keep a close eye on shares as the $11 gets tested.

Manhattan Associates Inc.

We're seeing the exact same price setup in shares of mid-cap tech stock Manhattan Associates Inc. (MANH) . Like AES, this stock's selloff started months ago -- shares of Manhattan Associates have lost a quarter of their value since July. And a textbook example of a descending triangle pattern could kick off a second leg lower here.

For MANH, the breakdown level to watch is $48.

What makes that $48 level in particular so significant for Manhattan Associates? It all comes down to buyers and sellers. Price patterns, like this descending triangle, are a good quick way to identify what's going on in the price action, but they're not the actual reason it's tradable. Instead, the "why" comes down to basic supply and demand for shares of MANH itself.

The $48 support level in Manhattan is a place where there has been an excess of demand for shares for the last month; in other words, it's a spot where buyers have been more eager to step in and buy shares than sellers have been to take gains. That's what makes a breakdown below $48 so significant -- the move means that sellers are finally strong enough to absorb all of the excess demand at that price level. Simply put, if Manhattan's share price violates $48, you don't want to own it anymore.

EnerSys

Last on our list of potentially bearish price setups is $3.5 billion industrial battery maker EnerSys (ENS) . EnerSys is looking bearish after a sharp rally at the end of last year -- and you don't need to be an expert trader to figure out what's happening on in this chart. Instead, the price action is about as simple as it gets.

Since peaking back in December, EnerSys has been bouncing its way lower in a well-defined downtrend, a price channel formed by a pair of parallel trendlines. Those trendlines identify the high-probability range for shares of ENS to remain stuck within. So far, every time this stock has rallied up to test trendline resistance, shares have been swatted lower in reaction. So, as shares hit their head on that price ceiling for a sixth time, it makes sense to sell the next bounce lower.

Waiting for that bounce lower before clicking "sell" is a critical part of risk management for two big reasons: It's the spot where prices are the highest within the channel, and alternatively, it's the spot where you'll get the first indication that the downtrend is ending.

Remember, all trend lines do eventually break, but by actually waiting for the bounce to happen first, you're confirming that sellers are still in control before you unload shares of EnerSys.

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

More from Stocks

Verizon to Take Massive Charges From Employee Buyouts, Weakness at Oath

Verizon to Take Massive Charges From Employee Buyouts, Weakness at Oath

Wall Street Futures Jump Higher, Global Markets Rally on US-China Trade Progress

Wall Street Futures Jump Higher, Global Markets Rally on US-China Trade Progress

What to Expect From the Markets in 2019 According to an Abbott Downing Executive

What to Expect From the Markets in 2019 According to an Abbott Downing Executive

Tesla Bucks the Bear Trend, and Could Go Even Higher

Tesla Bucks the Bear Trend, and Could Go Even Higher

They Don't Make Stock Market Corrections Like They Used To: Market Recon

They Don't Make Stock Market Corrections Like They Used To: Market Recon