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
David Somogyi Hello, This is merely a filter indicator for measuring high fractality, which helps to av...
bertrandpinoy bonjour ce code fonctionne toujours?
Nicolas Faites un backtest, vous aurez des réponses.
Krallenmann Hallo Nicolas, kannst du mir die Regeln für den Halftrend Indikator sagen? Aus dem Code kann...
davefransman Dear Nicolas, i want set a alert on the "HalfTrend "custom moving average" met Heikin Ashi w...
Nicolas Please post the question in a new forum topic, that would need custom coding I believe.
Sofitech Ce code n'est valable que sur la V10.3 ? sur le 10.2 il y a une erreur de syntaxe dans le fi...
Nicolas Oui en effet, c'est un indicateur "10.3" à cause uniquement de la mise en forme des courbes ...
Nicolas En effet, c'est le cas si on copie/colle le code. Ces 2 variables sont inscrites en externes...
Salocin Hello Nicolas, my french is not that well. It occurs an error which can not be solved by cop...
Nicolas Just download the ITF file and import it into your platform, follow these easy steps: https:...
Nicolas
7 years ago
Holt EMA
Holt EMA
1
Indicators
robertanthonyuk Hi,What do the each colour represent? Rob
Nicolas You'll need to preload bars to get the good calculations of you indicators. I did not test i...
David Nicolas I tried DEFPARAM Preloadbars = 5000 And still the same drawn output of entries/exit...
marcara Hi, Thank you very much for the Moving Average Daily indicator, I am using it as indicator i...
Nicolas Je l'ai converti depuis un code pinescript. De mémoire il s'agit bien d'une variation d'une ...
Captain_Walker @Nicolas, I've copied your code into PRT indicator panel to create it. When I attempt to sav...
Nicolas Download the itf file and import it.
Nicolas Please post any question on forums, thanks.
Lavallette Bonjour Nicolas. J'utilise la version 11 et moi aussi j'ai une ligne horizontale malgré l'a...
Nicolas il faut modifier la ligne 20 avec: if adaptive=1 and averagePeriod > 1 and barindex>(...
dakaodo Hi, Wilko. Acc to the original FRAMA paper by Ehlers, Ehler's own code only takes inputs for...
dakaodo For reference, here is Ehlers' original paper: http://www.mesasoftware.com/papers/FRAMA.p...
dakaodo Here is the code with only SC included, per ETFHQ. pri=customclose //len>=4, even on...
Nicolas The code is correct, don't know if the label and color are the same as other trading softwar...
peppe novellino Hi Nicolas, the settings of the alligators are not editable. How can I change it? Thanks in ...
pabo_swe I got very bad performance with this script, it was slow... it seems like if one breaks out ...
bluetime6 Hello Doctrading.   Can you ask you for something? Can you code a screener screen po...
gianlox I added a simple momentum indicator (MACD). I think much better results:   achat = 0v...
gianlox achat = 0 vente = 0 MACD12M = MACDline[12,26,9](close) MACD12S = ExponentialAverage[9](MA...
Nicolas Thank you for contribution. Please consider that advertising is tolerate as long as you cont...
triss1965@gmail.com  Hi, I cant make it work. And if you doing so much money. Why do you have to sell it? It don...
T-rader Eva... He dosen´t sell anything. He is just a nice guy that want to share on of his strategy...
Fabio Anthony Terrenzio this strategy works only in a well defined trend
brosly Good afternoon I am trying to get the complete code of lex strategy made by adolfo since I s...
dreif123 hi Adolfo, is Alex Auto Trading Botindex working on DAX as well ? if so , can you post the...
phili711 Bonjour Si la moyenne 100 est au dessus de la moyenne 20 le trend est baissier zlors pourqu...
Nicolas La comparaison se fait entre la valeur de la moyenne actuelle et telle qu'elle était il y a ...
Thomas007 we should definitely open a new thread for intraday trading - can we post the link once it's...
Denis Bonjour Nicolas, j'ai une question à propos de ce code, il faut que je la pose en anglais ca...
Nicolas En français pas de problème
Blue Sky A great job Nicolas, thanks. A question about averages, what period is the fast average and ...
Lotech123 This Indicator is very useful if the Risk number is altered to suit the time frame, volume o...
Bern error displaying, code must end with RETURN. Any idea hot to fix it?

Top