Simple moving average is calculated by adding up the prices for the specified
number of bars and then divide the total by the period used. The result is the
simple moving average for the current bar.

Long term SMAs are typically used to indicate trend direction. Prices moving
above and below SMA are often used as buy/sell signals. Another common
method of obtaining signals is to use two SMAs of different periods and
watch for crossovers.