Corrected generalized DEMA

v10.3
Corrected generalized DEMA

DEMA average is a double Exponential Moving Average. It was created to reduce the amount of lag time found in traditional moving averages.  It was first released in the February 1994 TASC magazine.

This version embed the corrected function, it measures deviations of the DEMA values, if the changes are not significant, then the value is “flattened”.

It also includes the floating levels functionality (2 levels based on recent highest high and lowest low of the corrected curve).

The DEMA and corrected DEMA change color following these criteria:

  • color change on slope change
  • color change on outer (floating) levels cross
  • color change on middle (floating) level cross
  • color change on average (DEMA) value cross

 

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Jan Wind • 11/20/2018 #

    Nicolas,

    could you explain why you have used 4 numbers to draw the candle ? First 3 defines the color ? true ?, what does the fourth mean ?

    drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,40) bordercolor(169,169,169,0)

    Thanks in advance, Jan

    • Nicolas • 11/20/2018 #

      Alpha transparency from 0 to 255.

  2. Jan Wind • 11/20/2018 #

    I like the principles behind this indicator.
    I prefer to use the TEMA instead of the DEMA. So therefore I adjust the word “DEMA”, used only once at line 20, for “TEMA”. This works only if you also adjust line 18 in the code “if barindex>Period*2 then” to ” if barindex>Period*3 then”, as the TEMA uses a triple moving average instead of double moving average with DEMA.

  3. ehtsham • 11/20/2018 #

    Hi, Sir can you tell me how to put this code in indicator plz

  4. Jan Wind • 11/20/2018 #

    Ehtsham,

    all you need to do is change the code in line 18 and line 20 (see the code above from Nicolas)
    ORIGINAL CODE
    18. if barindex>Period*2 then
    19
    20 avg = DEMA[Period](Series)

    ADJUSTED CODE (change 2 to 3 in line 18 and change DEMA to TEMA in line 20)
    18. if barindex>Period*3 then
    19
    20 avg = TEMA[Period](Series)

    KR Jan

  5. DimKar • 11/20/2018 #

    Dear sir , thank you very much for sharing !!!! it is awesome …!!!
    Please can you tell me what i have to do ( add/change) in order to coloured and make more visible that grey histogram in the indicator ?
    Many thanks !!!!
    Best Regards
    Dimitris

    • Nicolas • 11/20/2018 #

      Change line 62 with: drawcandle(flup,fldn,flup,fldn) coloured(169,169,169,80) bordercolor(169,169,169,0)

  6. DimKar • 11/20/2018 #

    Thank you very much from Greece sir , have a nice day ….!!!!
    Really i do not have words to thank you enough !!!
    Best Regards
    Dimitris

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
rama I want to use this indicator in trading system, it says zig zag is obsolete and not supported
Nicolas Right, due to its repainting behavior, the zigzag is not allowed in automated trading with r...
rama I noticed it changes as time progress, I am 7 as the average, how many period it wont chang...
Gordon101 Hi when I added your Guppy indicator to my chart it went below the chart beside the oscilla...
Nicolas Add it on the price by using the wrench located on the left upper side of your price chart.
Gordon101 Thanks Nicolas, worked a treat.
Rafa And the PriceMAPeriod? aren´t the same?
Nicolas The PriceMAPeriod is the period to make the average of all the last X medianprice found.
Rafa Thanks a lot Nicolás. Have a nice day
ak5hay2 Works like crazy on bitcoin. Use different timeframes. Thanks a lot Doc!!!
richyowen Hi, great code thanks. Very new to this forum. Is there a way to add a 100point target on an...
lisamitch50 Morning all, Just backtested on quite a few instruments, worked well on backtesting, but tel...
swapping merci gabri, on va le mettre à l'essai ;)
Leo Hi all, I posted a new version of this indicator ( I just add arrows to spot the local maxi...
Trading_En_El_Ibex35 Muchas Gracias por compartir este interesante indicador. Un saludo
xavieralava hola gracias leo
Khaled Thanks, but if I may ask what's EMA Period? The price which reverses the EMA[20] is not the ...
Francesco78 EMA is not a moving average, it is just the name we called the quantity defined above
Khaled My bad. Thank you so much!
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
Roberto Blázquez Hi David, I just saw your strategy and it's good!!! I'm going to try it from today in real a...
Thomas007 Is there any way to build something similar for FX? I wonder what would be the replacement f...
Kris75 Hi Bolsatrilera, I love this indicator! Thanks; => did you develop a strategy around...
KarlBenjamin This "indicator" alone has completely changed my algorithms for the better! Id even go as fa...
ashee CAN YOU SHARE MT4 FILE
coyP Big thanks ! Can you explain me how can I put this ON my graph and not under the graph please ?
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
Nicolas We do not offer free assistance for TOS. However, you can send demand for private paid codin...
phanz Hi community. May I know how you use this indicator please? Is it on the zero cross over? ...
sydney43025 Hello, I'm digging up this topic because I uploaded the code on a PRT v11.1 but the indicato...
David Balance thanks for sharing this excellent indicator.  Here are some thoughts.  please ad...
supertiti Il manque 2 slash devant len dans le code dur car la variable ne marche pas bonne journée
bearbull As per PhilipSchultz question above, has anybody managed to add code for when it turns blue,...
Ybr35 Bonjour Nicolas, lorsque je lance l'indicateur, il m'est indiqué que je dois définir les var...
Nicolas L'idéal est de télécharger le fichier itf joint sur cette page et de l'importer dans la plat...
Nicolas Merci dans ce cas d'ouvrir un sujet dans le forum ProScreener svp.
Andrea Hi Nicolas, thx for your code. Please i need your help to understand this part of your code:...
Nicolas the MA200 is ascending since 20 periods.
Leo Hi Gabri, have you ever try this in a trading system?
gabri Leo, I used to crosscheck this indicator a long time ago. For the trading I was doing at tha...
Nolubok Bonjour Gabri, merci pour l'ensemble de vos publications, serait il possible d'avoir le scr...

Top