Simple moving averages are calculated by adding the prices over a given number of periods, then dividing the sum by the number of periods. For example, a 15 day SMA would add together the closing prices for the last 15 days, and then divide that number by 15.
