A Moving Average is an indicator that shows the average value of a security's price over a period of time. An exponential (or exponentially weighted) moving average is calculated by applying a percentage of today's price to yesterday's moving average value. Exponential moving averages place more weight on recent prices. The formula of the exponential moving average is:
EMA[n] = values[n] * Exp_Percent + EMA[n-1] * (1 - Exp_Percent)
The exponential percentage is calculated internally from the 'period' parameter with the following formula:
Exp_Percent = 2 / (Time_Periods + 1)
If you prefer to work with exponential percentages you can use the following formula to convert the percentages to time periods:
Time_Periods = (2 / Exp_Percent) - 1