HPotter

D_ELI (Ehlers Leading Indicator)

This Indicator plots a single
Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading
Indicator) using intraday data.
Detrended Synthetic Price is a function that is in phase with the dominant
cycle of real price data. This one is computed by subtracting a 3 pole Butterworth
filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced
indication of a cyclic turning point. It is computed by subtracting the simple
moving average of the detrended synthetic price from the detrended synthetic price.
Buy and Sell signals arise when the ELI indicator crosses over or under the detrended
synthetic price.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
////////////////////////////////////////////////////////////
//  Copyright by HPotter v1.0 17/04/2014
// This Indicator plots a single
// Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading
// Indicator) using intraday data.
// Detrended Synthetic Price is a function that is in phase with the dominant
// cycle of real price data. This one is computed by subtracting a 3 pole Butterworth
// filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced
// indication of a cyclic turning point. It is computed by subtracting the simple
// moving average of the detrended synthetic price from the detrended synthetic price.
// Buy and Sell signals arise when the ELI indicator crosses over or under the detrended
// synthetic price.
// See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70. 
////////////////////////////////////////////////////////////
study(title="D_ELI (Ehlers Leading Indicator)", shorttitle="D_ELI (Ehlers Leading Indicator)")
Length = input(7, minval=1)
hline(0, color=red, linestyle=line)
xHL2 = security(tickerid, 'D', hl2)
xEMA1 = ema(xHL2, Length)
xEMA2 = ema(xHL2, 2 * Length)
xEMA1_EMA2 = xEMA1 - xEMA2
xResultEMA = ema(xEMA1_EMA2, Length)
nRes = xEMA1_EMA2 - xResultEMA
plot(security(tickerid, "D", xEMA1_EMA2), color=blue, title="D_DSP")
plot(security(tickerid, "D", nRes), color=green, title="D_ELI")