**EMA **- Exponential Moving Average. An exponential moving average is a type of *moving average* that is similar to a simple moving average(SMA), except that more weight is given to the latest data. EMA functions are used to assign exponentially decreasing weights over time, the weighting for each older datum decreases exponentially, never reaching zero. The main thing to notice is how much quicker the EMA responds to price reversals; whereas the SMA lags during periods of reversal.
**The indicator formula is: **
*EMA [today] = (Price [today] x K) + (EMA [yesterday] x (1 – K))*; Where K = 2 ÷(N + 1), N = the length of the EMA, Price [today] = the current closing price
**EMA in VisualJForex**
EMA block is located in the Indicator section under the MA category. Drag and drop the block on the board, connect it with another block or "Start point" and click on output field and create a variable of type Double to store the calculation result. The EMA is also used as the basis for other indicators, such as the MACD indicator. |