Software giant Microsoft Corporation (MSFT) is a component of the Dow Jones Industrial Average that is one of the best performing stocks so far in 2018. Microsoft is up 22.9% year to date, while the Dow 30 is up just 1.9%. The stock set its all-time intraday high of $106.50 on July 17, testing this week's risky level of $106.30. Microsoft stock is in bull market territory at 25.4% above is 2018 low of $83.83 set on Feb. 9.

Analysts expect Microsoft to post earnings per share between $1.07 and $1.12 when the company reports results after the closing bell on Thursday, July 19. Cloud computing has been an important driver for Microsoft in recent quarters. The company's Azure platform is now rivaling the Amazon.com, Inc. (AMZN) Amazon Web Services (AWS) platform. Overtaking AWS would be a huge positive. Microsoft's Commercial Cloud applications have been the driver of the stock's upward momentum and should be the focus following the earnings release after the close today. Microsoft also owns social media giant LinkedIn, which could be taking market share from Facebook, Inc. (FB) given the recent data scandals. (See also: Amazon Rivalry at Core of Partnership With Walmart: Microsoft CEO.)

The daily chart for Microsoft

Daily technical chart showing the performance of Microsoft Corporation (MSFT) stockCourtesy of MetaStock Xenith

Microsoft has been above a "golden cross" since Aug. 15, 2016, when the stock closed at $58.12, which justified adding to a core long position for the stock. A "golden cross" occurs when the 50-day simple moving average rises above the 200-day moving average, indicating that higher prices lie ahead. The stock has been above its 50-day simple moving average since July 2. The three horizontal lines at the top of the graph form a zone of risky levels – my monthly, quarterly and weekly pivots are $103.34, $105.06 and $106.30, respectively. My semiannual and annual value levels are $94.10 and $70.22, respectively.

[Check out Chapter 2 of the Technical Analysis course on the Investopedia Academy to learn more about using simple moving averages to develop your trading strategy.]

The weekly chart for Microsoft

Weekly technical chart showing the performance of Microsoft Corporation (MSFT) stockCourtesy of MetaStock Xenith

The weekly chart for Microsoft is positive but overbought, with the stock above its five-week modified moving average of $101.29. The 200-week simple moving average, or the "reversion to the mean," is at $62.67. The 12 x 3 x 3 weekly slow stochastic reading is projected to end this week at 86.73, up from 83.96 on July 13 – both readings are well above the overbought threshold of 80.00.  

Given these charts and analysis, investors should buy Microsoft shares on weakness to my semiannual value level of $94.10 and reduce holdings on strength to my weekly risky level of $106.30. (For additional reading, check out: 6 Big Techs Stocks May Get Slammed in a Trade War.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.