Hi,
Note sure if this is the appropriate forum but here goes..
I am trying to write a small software program to calculate Dr Alexander Elder's Force Index but I am having a problem trying to work out how he calculates Force Index 2 day EMA.
I am using example data shown in his book Trading for a Living to work out the algorithm, eg:
Date Close Volume FI FI:2-ema
10/29 25329 3834
10/30 25242 4495 -391065
10/31 25194 1372 -65856 -130807 <-----(1)
11/01 24295 2547 -2289753 -15701105 <-----(2)
Force Index(FI) = Volume[today] * (Close[today] - Close[Yesterday])
Using the formula for Force Index I can successful calculate and replicate the values in the Force Index Column.
In order to calculate (2) I apply the formula Elder gives for EMA earlier in his text:
FI:2-ema[today] = FI[today]*k + FI:2-ema[yesterday]*(1-k)
k = 2/(n + 1) where n is number of days for ema i.e. 2 in this case
and this works fine.
However I can not see how he has calculated (1). It states in the text that when calculating the first value of an ema a simple moving average has to be constructed. Thus I calculated this by summing the first two FI values and dividing this by 2 but this does not provide the answer shown in (1). Obviously I am missing something here and would appreciate it somebody could provide an insight into how (1) is calculated in this
case.
Note sure if this is the appropriate forum but here goes..
I am trying to write a small software program to calculate Dr Alexander Elder's Force Index but I am having a problem trying to work out how he calculates Force Index 2 day EMA.
I am using example data shown in his book Trading for a Living to work out the algorithm, eg:
Date Close Volume FI FI:2-ema
10/29 25329 3834
10/30 25242 4495 -391065
10/31 25194 1372 -65856 -130807 <-----(1)
11/01 24295 2547 -2289753 -15701105 <-----(2)
Force Index(FI) = Volume[today] * (Close[today] - Close[Yesterday])
Using the formula for Force Index I can successful calculate and replicate the values in the Force Index Column.
In order to calculate (2) I apply the formula Elder gives for EMA earlier in his text:
FI:2-ema[today] = FI[today]*k + FI:2-ema[yesterday]*(1-k)
k = 2/(n + 1) where n is number of days for ema i.e. 2 in this case
and this works fine.
However I can not see how he has calculated (1). It states in the text that when calculating the first value of an ema a simple moving average has to be constructed. Thus I calculated this by summing the first two FI values and dividing this by 2 but this does not provide the answer shown in (1). Obviously I am missing something here and would appreciate it somebody could provide an insight into how (1) is calculated in this
case.