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).
//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
//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