Blocks

Short Description

Exponential moving average: Exponentially smoothed moving average is calculated by adding of a certain share of the current closing price to the previous value of the moving average.

Tooltips

instrument - defines Instrument of bars used as indicator data source.

period - defines Period of bars used as indicator data source.

shift - Defines which bar the indicator is calculated for: 0 - current unformed bar, 1 - previous bar and so on.

Time Period Integer - number of bars used in calculation.

Line Double - Indicator output (the result of indicator calculation).

Main Description

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.