A Moving Average is a stock indicator commonly used in technical analysis. The reason for calculating the moving average of a stock is to help smooth out the price data by creating a constantly updated average price. This makes it easier to identify trends and patterns in the stock data. There are different types of moving averages, but the most common one used is the simple moving average (SMA).Diagram of Moving Averages: -The SMA is calculated by taking the sum of all closing prices over a certain period of time and then dividing that sum by the number of periods in that time frame. For example, if you wanted to calculate the 50-day SMA for XYZ Corp., you would take all of XYZ's closing prices from the past 50 days, add them together, and then divide by 50.The MA can be applied to any type of chart including line charts, bar charts or candlestick charts. When using this indicator on your own charting software, you will need to select both your desired time frame and MA length.