In technical analysis of stock trading, we can use the moving averages of the historical prices of a stock to indicate whether it is currently in the uptrend or downtrend. 

Let me exemplify the idea to focus my question. I may use a 10-day moving average, MA10, and a 30-day moving average, MA30. If, at the present time, MA10 equals MA30 and the rate of change of MA10 is positive, then I can believe that the price is in uptrend, or in downtrend if negative.

The question is, I would like to know **the mathematical principle behind this trick. Why using the averages as such can improve the possibility of the price being in uptrend or downtrend?**