Every trader needs not just to know how to use an indicator but also to understand how it is built and what it shows.
There is just one way of the simple moving average formula calculation:
SMA = (P1 + P2 + P3 + … + Pn)/N
Where P stands for “price” and N is the quantity of days for which we need to find the calculation.
Nowadays there is no need to calculate this formula by yourself because all the calculation will be made automatically by Forex Tester or by your live trading terminal. But still it is very useful to know what the average is all about. To tell about it in a simple way, you just need to know the following:
It is convenient to get an aggregate information about each bar (candlestick) with the help of Forex Tester’s Data Window. There you will see the date, time, open, high, low and close prices, volumes, bar index and all the values of the indicators that are going through this particular bar.
|# of the bar||The close price||SMA||EMA||Values for MAs||Quantity of bars|
|11||1.14826||1.14808||1.14826||Bar 1 – Bar 10||10|
|12||1.15130||1.14828||1.14881||Bar 2 – Bar 11||10|
|13||1.14721||1.14803||1.14852||Bar 3 – Bar 12||10|
|14||1.14613||1.14766||1.14809||Bar 4 – Bar 13||10|
|15||1.14670||1.14760||1.14783||Bar 5 – Bar 14||10|
|16||1.14838||1.14769||1.14793||Bar 6 – Bar 15||10|
|17||1.14855||1.14782||1.14805||Bar 7 – Bar 16||10|
|18||1.14872||1.14796||1.14817||Bar 8 – Bar 17||10|
|19||1.14927||1.14813||1.14837||Bar 9 – Bar 18||10|
|20||1.15048||1.14867||1.14875||Bar 10 – Bar 19||10|
The formula for the Exponential Moving Average is not that simple. At first we need to use this moving average formula for finding out the multiplier which differs for every period of this line.
M= 2/ (N+1)
To calculate moving average with a 10 period parameter you should find the multiplier first:
M=2/ (10+1) = 0.1818
The final formula for EMA calculating will look like this:
EMA = (Price of this bar – EMA of the previous bar) * Multiplier + EMA of the previous bar.