There's a stock market story that most people are missing as the big S&P 500 index hovers just below all-time highs: a big chunk of this market is bleeding red right now.

As I write, 27% of S&P 500 components are underperforming the broad market by 10% or more over just the past six months. That's some worrying underperformance when you consider that it means nearly one-in-three S&P stocks has totally missed out on the breakneck rally that's pushed the indices to new high water marks in 2017.

Simply put, a material chunk of the stock market has been toxic to your portfolio's performance this year ...

The good news is that you don't need to try to find the very best performers for 2017 to wring the biggest profits out of the market this year. All you need to do is avoid the worst ones.

So, to find the stocks to avoid in March, we're turning to the charts for a technical look at four you should consider selling here ...

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.

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

AES Corp.

Image placeholder title

Up first on our list of potentially toxic trades is $7 billion utility AES Corp. (AES) - Get Report.

AES hasn't been a particularly attractive name to hold in your portfolio in the past few months--since peaking back in late September, shares have shed more than 16% of their market value, missing out in the recent stock rally wholesale. The bad news is that shares could have even further to fall thanks to a classic bearish continuation setup that's showing up on the chart above.

AES' price setup is a descending triangle, a price pattern formed by horizontal support down below shares at $11 and downtrending resistance to the topside. Basically, as AES bounces between those two technically important price levels, shares have been getting squeezed closer and closer to a breakdown through that $11 line in the sand. If that $11 price tag gets violated, AES becomes a sell ...

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 stuck in a downtrend of its own since shares peaked in September, indicating that this stock is continuing to underperform the rest of the market even now. Continued underperformance looks likely here at the exact same time shares are teetering on the edge of $11. Buyer beware.

Michaels Companies Inc.

Image placeholder title

Meanwhile, it doesn't get much simpler than what we're seeing right now in shares of midcap arts and crafts retailer Michaels Companies Inc. (MIK) - Get Report. This stock has been stuck in a textbook downtrending channel since June, down 27% since the pattern started. The next bounce lower from here is a sell signal.

Michaels' downtrend is formed by a pair of parallel trend lines that have corralled most of this stock's upside on every attempt to break higher. So far, every test of trendline resistance has resulted in a return to the bottom of the channel--and shares are testing that down-sloping resistance line for a fourth time this week. That's why it makes sense to sell the next failure at that price level.

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 Michaels.

Costco Wholesale Corp.

Image placeholder title

For an example of one of those aforementioned trendline breaks, look no further than another retailer: $72 billion membership warehouse chain Costco Wholesale Corp. (COST) - Get Report. Costco has actually been an attractive stock to own lately--shares have rallied about 17% since bottoming back at the start of November, handing investors some market-beating returns in a short timeframe.

But it's starting to look like a good time to take some of those recent gains off the table in Costco ...

That's because this stock took a 4.3% drop at the start of the month, when Costco reported its second-quarter earnings numbers. While Wall Street was expecting a $1.31 profit for the quarter, on average, Costco ended up earning $1.17, posting its biggest earnings miss in more than a decade. Even though the 4.3% reaction drop wasn't all that significant from an absolute size standpoint, the level that it brought Costco below absolutely was.

Costco violated its uptrend from November the following session, invalidating the momentum that had been helping shares higher for months. That move opens up meaningful downside risk from here. Until Costco can start establishing a series of higher lows again, it makes sense to avoid being a buyer.

Tesla Inc.

Image placeholder title

Finally, another major reversal signal is showing up in momentum favorite Tesla Inc. (TSLA) - Get Report. Tesla is another stock that's coming off a strong uptrend from the end of 2016--shares are up about 30% in the past three months alone. But Tesla is starting to look "toppy" in March. Here's when to sell:

Tesla's reversal pattern is a head and shoulders top, a bearish reversal pattern that indicates 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 triggers when Tesla's neckline gets materially violated--that happens at the $240 price level.

Remember to be reactionary with the Tesla trade--or any of the other potentially toxic setups on this list. Shares don't become a high-probability sell until they actually violate their price floor. Until then Tesla is simply waving a caution flag for buyers.

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