24. 8. 2021

5 4

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/

Subscribe
Notify of
4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Emmanuel
20. 12. 2021 3:36 pm

This is a very good idea !!!! Thank you for your excellent work Clonex !!!

Vishal Rana
22. 8. 2022 3:07 am

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 »

jetrading
jetrading
10. 6. 2023 7:42 am

Is there sqDEMA indication for MT5. I have searched but cannot find it here?

tomas262
Admin
Reply to  jetrading
13. 6. 2023 11:53 am

You can find the DEMA indicator here https://www.mql5.com/en/code/73