# D_ELI (Ehlers Leading Indicator) Strategy

1457 lượt xem
This Indicator plots a single
Daily DSP (Detrended Synthetic Price) and a Daily ELI ( Ehlers Leading
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.

## Bình luận

I ported to version 3 and get some different results. They are also different when I create an alert. It seems as if the version 2 repaints into a great result for the backtest but miss out in real time. Is there any way I can see how it will perform in real time on the back test?
Phản hồi
greenorangebay
@greenorangebay, If I understand correctly you should to change line 22 on the xEMA1_EMA2 = xEMA1 - xEMA2 or use calculate on bar close for strategy settings.
Phản hồi
HPotter
@HPotter, sorry parser of TV remove values. Use xEMA1_EMA2 = xEMA1 - xEMA2
Phản hồi
HPotter
@HPotter, ah ah... I can`t wrote it )))) parameter in the xEMA1 and xEMA2, you should to take previous value of bar.
Phản hồi
HPotter
@HPotter, xEMA1/
Phản hồi
HPotter
@HPotter, I did like this: calcPos() =>
pos = 0.0
pos := iff(nRes > 0, 1, iff(nRes < 0, -1, nz(pos, 0)))

could you explain what you mean more?? :)
Phản hồi
greenorangebay
@greenorangebay, when changing to version 3; the results change dramatically
Phản hồi
greenorangebay
@greenorangebay, it might have to do with this barmerge.lookahead_off / barmerge.lookahead_on for the security function
Phản hồi
greenorangebay
Phản hồi
HPotter
@HPotter, Use xEMA1_EMA2 = xEMA1{1} - xEMA2{1} in my original code
Phản hồi