Costco Wholesale (COST) - Get Report has been taking a breather lately, with the shares slightly below the September highs. 

While the rest of the market has been marching higher, the Issaquah, Wash., membership retailer's shares have been digesting gains. The shares are still up more than 45% so far in 2019.

That said, during its latest consolidation, the stock couldn’t maintain above up-trend support or a key moving average. The shares continue to drift sideways.

The retail sector has been difficult this year. Some stocks, like Target (TGT) - Get Report and Lowe’s (LOW) - Get Report, have been doing incredibly well. Others, particularly certain apparel companies, have struggled.

Investors have long considered Costco a superior business, one that could hold up despite the advances of Amazon (AMZN) - Get Report. That thesis will be put to the test when Costco releases its quarterly figures after the close on Thursday.

Let’s look at the charts.

Amazon is a holding in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells AMZN? Learn more now.

Trading Costco Stock

Daily chart of Costco stock.

Daily chart of Costco stock.

A look at the chart above highlights the consolidation over the past few months. After peaking near $305, Costco shares pulled back and declined to the 50-day moving average.

The 50-day moving average and up-trend support (blue line) had both served as areas for investors to buy the dip throughout 2019. But uptrend support gave way in November, while the 50-day failed to buoy the company in December.

While that's usually a bearish development, Costco stock doesn’t come off that way. In fact, boring as it may seem, this is likely the healthiest action that bulls can ask for ahead of earnings.

So what's the post-earnings game plan?

On a bullish reaction, I want to see COST stock reclaim the 50-day moving average and break out over $305. 

If Costco can’t break out over $305, this area may continue to act as resistance and suggest that the shares still need more time to digest this year’s rally. 

Over $305 and the backside of prior up-trend support could be a possible upside target.

On the downside, bulls will want to see the 100-day moving average hold as support. But that’s only about 2% below current levels, so it’s a tough ask for that level to buoy the stock around a potentially volatile event.

If it holds, then that’s great for bulls, as they can look to see if Costco can reclaim the 50-day moving average in the ensuing sessions. 

Below the 100-day moving average and the $282 level could be in the cards. This mark was resistance in July and support in October. It also comes into play near the 78.6% retracement.

The bottom line: On the upside, see if Costco stock can reclaim the 50-day moving average and break out over $305. On the downside, see if the 100-day moving average holds as support. Below puts $282 on the table.