The simple moving average
The simplest moving average is simple to construct, and it's called (surprise) the simple moving average (SMA). It can come in any number of days or periods selected by the trader. Here's the formula:
P is the price of the commodity being averaged.
N is the number of days (or periods) in the moving average.
The value of an SMA is determined by the values that are being averaged and the time period. For example, a 10-day SMA shows the average price for the past 10 days, a 20-day SMA shows the average price for the past 20 days, and so on. The time period depends on the trader's time horizon, which can be years, months, ...