What is the reason that a particular moving average can act as a good indicator of support and resistance for a particular stock? Moving average is just an avg of closing prices over 30 days or 50 days etc. So the fact that the stock price is stopped from crossing the line drawn by the moving avg seems just coincidental. Is there a reason that is easy to understand? Is the reason of an empirical nature, i.e. backed only by evidence, not by logic?
As you point out, the moving average is just
MA(k)t = (Pt-1 + … + Pt-k )/k and is applied in technical analysis (TA) to smooth out volatile (noise) price action. If it has any logic to it, you might want to think in terms of return series
(Pt - Pt-1 / Pt-1) and you could hypothesize that prices are in fact predictable and will oscillate below and above a running moving average. Below is a link to a study on MA trading rules, published in the Journal of Finance, with the conclusion of predictive power and abnormal returns from such strategies. As with any decision made upon historical arguments, one should be aware of structural changes and or data mining.
Brock, W., J. Lakonishok and B. Le Baron, 1992, Simple technical trading rules and the stochastic properties of stock returns, Journal of Finance, 47, 1731-64. MA rules betterthan chance in US stock market, 1897-1986
I don't know whether you are new to TA or not, but a great commercial site, with plenty of computer-generated signals is FinViz.
A moving average will act as support or resistance to a stock only when the stock is trending. The way it acts as support for instance is similar to a trend-line.
Take the daily chart of CBA over the last 6 months:
The first chart shows CBA with an uptrend support line.
The second chart shows CBA during the same period with 50 day EMA as a support.
Both can be used as support for the uptrend. Generally you can used these types of support (or resistance in a downtrend) to determine when to buy a stock and when to sell a stock.
If I was looking to buy CBA whilst it was uptrending, one strategy I could use was to wait until it hit or got very close to the support trend-line and then buy as it re-bounces back up.
If I already held the stock I could use a break down below the uptrend support line as a stop to exit out of the stock.
It's not stopped. Crossing a moving average is considered a signal to buy or sell. Yahoo stock charts offer the ability to add moving averages to the charts, and you can observe all stocks cross the line regularly.
As a contrast to Victor's charts, you can see that Apple, over the last two years, has traded above and below the 50 day MA. A believer in technical analysis using MA will observe a buy signal in Dec '11 just under $400, with a sell in mid-$500s in May. Moving averages are a form of following the trend, and work well when either trend is strong. It's when the stock is too close to the line that's it's tough to call whether it's time to be in or out.