new John Ehlers indicator Forward Reverse EMA
Forums › ProRealTime English forum › ProBuilder support › new John Ehlers indicator Forward Reverse EMA
- This topic has 23 replies, 8 voices, and was last updated 5 years ago by rigel.
-
-
06/27/2017 at 11:14 AM #39171
Hello, from the last video of better system trader I discovered this new indicator from John Ehlers
He gave the code in Easylanguage that you can find here
http://downloads.bettersystemtrader.com/files/ForwardReverseEMA.txt
{
Forward / Reverse EMA
(c) 2017 John F. Ehlers
}Inputs:
AA(.1);Vars:
CC(.9),
RE1(0),
RE2(0),
RE3(0),
RE4(0),
RE5(0),
RE6(0),
RE7(0),
RE8(0),
EMA(0),
Signal(0);CC = 1 – AA;
EMA = AA*Close + CC*EMA[1];RE1 = CC*EMA + EMA[1];
RE2 = Power(CC, 2)*RE1 + RE1[1];
RE3 = Power(CC, 4)*RE2 + RE2[1];
RE4 = Power(CC, 8)*RE3 + RE3[1];
RE5 = Power(CC, 16)*RE4 + RE4[1];
RE6 = Power(CC, 32)*RE5 + RE5[1];
RE7 = Power(CC, 64)*RE6 + RE6[1];
RE8 = Power(CC, 128)*RE7 + RE7[1];Signal = EMA – AA*RE8;
Plot1(Signal);
Plot2(0);I translated like this for prt, can you please tell me if it is ok?
12345678910111213141516171819AA= 0.1CC = 1 - AAif barindex > 1 thenEMA = AA*Close + CC*EMA[1]RE1 = CC*EMA + EMA[1]RE2 = EXP(2*LOG(CC))*RE1 + RE1[1]RE3 = EXP(4*LOG(CC))*RE2 + RE2[1]RE4 = EXP(8*LOG(CC))*RE3 + RE3[1]RE5 = EXP(16*LOG(CC))*RE4 + RE4[1]RE6 = EXP(32*LOG(CC))*RE5 + RE5[1]RE7 = EXP(64*LOG(CC))*RE6 + RE6[1]RE8 = EXP(128*LOG(CC))*RE7 + RE7[1]Signal = EMA - AA*RE8endifreturn Signal06/27/2017 at 12:20 PM #39182Your code is correct to me. You should post it into the library. Haven’t heard of this new John Ehlers’ formula before your post, thank you.
1 user thanked author for this post.
06/27/2017 at 12:22 PM #39184Thank you Nicolas, only concern is that is not really an oscilator as is not bounded between 2 values. I am a bit puzzled..
06/27/2017 at 12:28 PM #39187Just like an MACD, who cares? 😉 There is a “zero” level, but I understand your concern .. how to use it effectively? Maybe the answers are in the Ehlers’ interview?
1 user thanked author for this post.
06/27/2017 at 12:33 PM #39188in the interview he just said to use it as a mean reverting tool, without further specification. He is postponing the explanation to the people attending hismaster class understandably 🙂
06/27/2017 at 12:50 PM #39195Submitted to the library
1 user thanked author for this post.
06/27/2017 at 1:19 PM #39208Ok, so let’s use STANDARD DEVIATION like in these indicators, it would complete the analysis because as you stated this indicator is not bounded and doesn’t have any overbought/oversold areas:
https://www.prorealcode.com/prorealtime-indicators/dynamic-zone-stoch-rsi/
https://www.prorealcode.com/prorealtime-indicators/tti-atr-extreme/
etc. Whatever examples using deviation of a normal distribution around a dynamic mean.
1 user thanked author for this post.
06/27/2017 at 1:26 PM #39210Great idea, will do.
06/27/2017 at 3:44 PM #3922912345678910111213141516171819202122AA= 0.1CC = 1 - AAif barindex > 1 thenEMA = AA*Close + CC*EMA[1]RE1 = CC*EMA + EMA[1]RE2 = EXP(2*LOG(CC))*RE1 + RE1[1]RE3 = EXP(4*LOG(CC))*RE2 + RE2[1]RE4 = EXP(8*LOG(CC))*RE3 + RE3[1]RE5 = EXP(16*LOG(CC))*RE4 + RE4[1]RE6 = EXP(32*LOG(CC))*RE5 + RE5[1]RE7 = EXP(64*LOG(CC))*RE6 + RE6[1]RE8 = EXP(128*LOG(CC))*RE7 + RE7[1]result = EMA - AA*RE8endifr = 50+(100-(result*10000))*2g = 50+(100+(result*10000))*2RETURN result COLOURED(r,g,50)style(histogram) as "result", 0 as "0"Nice colours!
06/28/2017 at 3:49 PM #39328Hi, thanks, I didn’t know this new indicator from Ehlers
For fun, we see it’s a “suite” and I tried to replace the re2…re8 by an instruction for /next who will me more adjustable
I don’t know why this suite doesn’t work, if someone as an idea
12345678910111213141516171819202122232425262728293031// variable val=5AA= 0.1CC = 1 - AAif barindex > 11 thenEMA = AA*close + CC*EMA[1]RE1 = CC*EMA + EMA[1]once result=0for n=1 to valm=1for nn=1 to valm=2*mnextcoef=EXP(2*m*LOG(CC))RE1 = coef*RE1[n] + RE1[n+1]nextresult = EMA - AA*RE1endifRETURN result1 user thanked author for this post.
06/29/2017 at 8:16 AM #39345Seems to work fine for me Zilliq, what’s the problem please?
Did you manage to get something new with the OB/OS dynamic areas?
I don’t see any “nice colours”? 🙂
06/29/2017 at 8:26 AM #3934706/29/2017 at 8:41 AM #39352I think the problem is that RE1 to RE8 are variables that must be set because they compute each one separately and you can’t create them dynamically like the way you did. It would be possible with arrays support though.. But I could be wrong, this is quick thought.
06/29/2017 at 8:48 AM #39353hello everyone,
@Nicoas, yes I did try some combination, I just wanted to test if it is usable for at least 1 strategy.
Give me a couple of days and hopefully I will have something.
cheers
06/29/2017 at 9:03 AM #39354Nice! I asked you because your post is still in the pending list for the library, we will change it accordingly to your new version 🙂
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on