Double exponential moving averages (DEMA)
The double exponential moving average (DEMA) is a technical indicator introduced by Patrick Mulloy in his January 1994 article “Smoothing Data With Faster Moving Averages” in Technical Analysis of Stocks & Commodities magazine. The purpose is to reduce the amount of noise present in price charts used by technical traders.
The DEMA uses two exponential moving averages (EMAs) to eliminate lag, as some traders view lag as a problem. The DEMA is used in a similar way to traditional moving averages (MA). The average helps confirm uptrends when the price is above the average and helps confirm downtrends when the price is below the average. When the price crosses the average that may signal a trend change. Moving averages are also used to indicate areas of support or resistance.
Indicator is implemented for: MT4 /Tradestation/ Multicharts.
Important – a bug was found in DEMARising, DEMAFalling SQX Java code – we reuploaded the fixed extension.
If you downloaded DEMA before 22.3.2023 please redownload it.
The Formula for the Double Exponential Moving Average Is:
Source: https://www.investopedia.com/terms/d/double-exponential-moving-average.asp
How to import this indicator: https://strategyquant.com/doc/programming-for-sq/import-export-custom-indicators-and-other-snippets/
This is a very good idea !!!! Thank you for your excellent work Clonex !!!
This doesn’t compile in MC. It fails due to break in the switch case. However, even after commenting the break from the switch case the results are very different from SQ. switch( AppliedPrice )begin case 0: XMA = XAverage( Close, Length ) ; XMA2 = XAverage( XMA, Length ) ; // Break; case 1: XMA = XAverage( Open, Length ) ; XMA2 = XAverage( XMA, Length ) ; // Break; case 2: XMA = XAverage( High, Length ) ; XMA2 = XAverage( XMA, Length ) ; // Break; case 3: XMA = XAverage( Low, Length ) ; XMA2 = XAverage(… Read more »
Is there sqDEMA indication for MT5. I have searched but cannot find it here?
You can find the DEMA indicator here https://www.mql5.com/en/code/73