Return the value of the technical indicator “Double Exponential Moving Average” over N periods on ‘price’ type selected.
Syntax:
1 |
DEMA[N](price) |
Calculation :
We start to calculate MME1, a (n day) exponential moving average . The we calculate MME2, that’s the exponential moving average of MME1 with the same period.
Finally the indicator DEMA = 2 * MME1 – MME2
Interpretation :
This indicator is faster and more smoothed thant a standard moving average. DEMA could be used with other indicators (MACD, stochastic oscillator).
Example:
1 2 3 4 5 6 7 8 |
i1 = DEMA[10](open) a = 0 WHILE Open[1]<i1 DO a = a +1 WEND RETURN a |