John Ehlers introduces a new averaging indicator in his new article “Reflex: A New Zero-Lag Indicator” in the February 2020 issue of TASC magazine. J.Ehlers has designed it with reducing lag in mind.
According to the author, this new indicator can be used to generate signals in a more timely manner than other lagging calculations. In this new article John Ehlers propose 2 new zerolag indicators: The Reflex indicator which synchronizes with the cycle component in the price data. The second, its “companion”, the Trendflex oscillator retains the trend component.
Using both of them in the same window, like I did in the attached picture, give a perfect picture of what Ehlers have in mind to mark the trend (Trendflex oscillator) and its market cycles (Reflex oscillator).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
//PRC_Reflex Ehlers | indicator //14.01.2020 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge // --- settings Length=20 // --- end of settings if barindex>Length then //Gently smooth the data in a SuperSmoother a1 = exp(-1.414*3.14159 / (.5*Length)) b1 = 2*a1*Cos(1.414*180 / (.5*Length)) c2 = b1 c3 = -a1*a1 c1 = 1 - c2 - c3 Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2] //Length is assumed cycle period Slope = (Filt[Length] - Filt) / Length //Sum the differences Sum = 0 For count = 1 to Length Sum = Sum + (Filt + count*Slope) - Filt[count] next Sum = Sum / Length //Normalize in terms of Standard Deviations MS = .04*Sum*Sum + .96*MS[1] If MS <> 0 Then Reflex = Sum / SQRT(MS) endif endif return Reflex |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
//PRC_Trendflex Ehlers | indicator //14.01.2020 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge // --- settings Length=20 // --- end of settings if barindex>Length then //Gently smooth the data in a SuperSmoother a1 = exp(-1.414*3.14159 / (.5*Length)) b1 = 2*a1*Cos(1.414*180 / (.5*Length)) c2 = b1 c3 = -a1*a1 c1 = 1 - c2 - c3 Filt = c1*(Close + Close[1]) / 2 + c2*Filt[1] + c3*Filt[2] //Sum the differences Sum = 0 For count = 1 to Length Sum = Sum + Filt - Filt[count] next Sum = Sum / Length //Normalize in terms of Standard Deviations MS = .04*Sum*Sum + .96*MS[1] If MS <> 0 Then Reflex = Sum / SQRT(MS) endif endif return Reflex |
Share this
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
I have just the place for this.. love John Ehlers’s work. Thanks Nicolas!
Buenas tardes Nicolás . Como podría introducir una línea cero a este indicador? . Muchas gracias de antemano .
Change the last line with :
RETURN Reflex, 0
Muchísimas gracias Nicolás , muy amable.
extrèmement pertinent
Is that beatable ?