The EMA works with previously calculated values and uses the smoothingfactor to blend in the new levels
The smoothing factor does not necessarily have to be a function of the amount of days we are calculating but ran rather be an arbitrary value like 0.1 (10% smoothing).
Here is an example graph which depicts a SMA, and an EMA: