Microsoft (MSFT - Get Report) was a victim of the popping of the tech bubble. In December 1999, the stock set its all-time high of $59.97. Fast forward to 2015, and the stock was near that high again, setting a multiyear high of $56.85 on Dec. 29. Since then, the stock has had its ups and downs and traded as low as $48.04 on June 27 on an initial negative reaction to the Brexit vote.

Since the June 27 low, the stock is up 11.8%, outperforming the 8.8% gain for the Dow Jones Industrial Average (INDU) , of which it is a component. Microsoft has a dividend yield of 2.96%, vs. the yield of 1.54% for the 10-year U.S. treasury note. The stock has an elevated price-to-earnings ratio of 41.8 vs. an average of 19.7 for the Dow 30.

Analysts expect Microsoft to earn 58 cents a share when the company reports after the closing bell on Tuesday.

Of note will be the sales of the Windows 10 operating system. Recent reports show that the company's goal of billion installs by the end of June 2018 will not be achieved. Weakness in PC sales is one related warning. Investors will be interested in the company's master plan for LinkedIn (LNKD) , the social media company Microsoft recently acquired.

Keep in mind that shares were hit hard on a negative reaction to earnings reported for the first quarter of 2016 on April 21. 

The daily chart below shows how to trade Microsoft based upon the Fibonacci retracement levels from the Dec. 29 high of $56.85 and the June 27 low of $48.04. Following a rise of 11.8% from the low, the weekly chart is positive.

Here's the daily chart for Microsoft.

 

Courtesy of MetaStock Xenith

Microsoft closed Monday at $53.70, down 2.7% year to date but just 5.1% below the Dec. 29 high of $56.85. The stock has a solid gain of 11.8% since the June 27 low of $48.04.

The horizontal lines are the Fibonacci retracement levels of the 15.5% decline from the December 2015 high to the June 27 low. The stock is 12.3% above the low.

Microsoft was about to set a new multiyear high on April 19, when it traded as high as $56.77. The company reported disappointing earnings after the closing bell on April 21, and that day's low was $55.42, as shown by another horizontal line on the chart.

From the close of $55.78 on April 21 to the open of $51.91, the stock plunged 6.9%. The stock moved sideways to down since then, trading to the June 27 low.

As the chart shows, shares of Microsoft hopscotched above its 23.6% retracement of $50.12 on June 29, then its 38.2% retracement of $51.40 on July 8, its 50% retracement of $52.44 on July 11 and then the 61.8% retracement of $53.49 on July 13. It traded to a fresh post-Brexit high of $54.34 on Monday.

The key levels to hold on post-earnings weakness begin with the 61.8% retracement of $53.49. The key on post-earnings strength is to fill the gap to the April 21 low of $55.42.

Here's the weekly chart for Microsoft.

Courtesy of MetaStock Xenith

The weekly chart shows a red line through the price bars, marking the key weekly moving average (a five-week modified moving average). The green line is the 200-week simple moving average, the "reversion to the mean." The study in red along the bottom of the chart is weekly momentum (a 12x3x3 weekly slow stochastic), which scales between 00.00 and 100.00, where readings above 80.00 indicate overbought and readings below 20.00 indicate oversold. A negative weekly chart shows the stock below its key weekly moving average, with weekly momentum declining below 80.00 in a trend toward 20.00.

The weekly chart for Microsoft is positive, with the stock above its key weekly moving average of $52.36 and well above its 200-week simple moving average of $41.44. The weekly momentum reading is projected to rise to 51.43 this week, up from 37.52 on July 15.

Investors looking to buy Microsoft should consider doing so on weakness to $53.19 and $53.03, which are key levels on technical charts until the end of July and the end of this week, respectively. My key levels for all of 2016 are at $38.02 and $36.69.

Investors looking to reduce holdings should consider selling strength to $54.95 and $55.81, which are key levels on technical charts until the end of September and the end of 2016, respectively.

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