Page 1 of 3

Zero Lag indicator

PostPosted: Mon Oct 25, 2010 8:15 pm
by vstrelnikov
Zero Lag indicator is described in November 2010 issue of Stocks & Commodities.

The formula of the indicator is:
ZL = α * (EMA + Gain * (Close - ZL[1])) + (1 - α) * ZL[1]

The formula is similar to EMA, except that new term Gain * (Close - ZL[1]) is introduced.
'Gain' represents the value which is chosen from [-GainLimit, GainLimit] interval to minimize
the error for current data sample, (Close - ZL) → min

ZeroLag.png


Download the indicator:
ZeroLag.lua
(2.93 KiB) Downloaded 2030 times


ZeroLag With Alert.lua
(9.7 KiB) Downloaded 1155 times

This indicator provides Audio / Email Alerts on Price / MA cross (Real Time)
or/and MA slope changes (end of turn)
Dec 15, 2015: Compatibility issue Fix. _Alert helper is not longer needed.

Zero Lag Indicator.lua
(3.24 KiB) Downloaded 955 times

Re: Zero Lag indicator

PostPosted: Thu Oct 28, 2010 1:35 am
by Blackcat2
Hi,

Could you please provide an option to change line type (dash, dot, or dash-dot, etc) and thickness

Thanks.. :)

Re: Zero Lag indicator

PostPosted: Thu Oct 28, 2010 3:06 am
by Apprentice
Style options Added.

Re: Zero Lag indicator

PostPosted: Sat Oct 30, 2010 5:12 pm
by Jigit Jigit
Again - thanks a lot for this one.
Could you also make it change colour depending on the trend?
e.g. green on an up trend, red on a down trend
It would be great if there was an option to choose the colours according to one's liking.
:D

Re: Zero Lag indicator

PostPosted: Sun Oct 31, 2010 6:42 am
by Apprentice
Added to developmental cue.

Re: Zero Lag indicator

PostPosted: Thu Dec 23, 2010 8:58 am
by hhbraz
Hi,
Thanks for this excellent indicator. Is it possible to code a signal for this indicator, and also code a signal for the zero-lag MACD?
hhb

Re: Zero Lag indicator

PostPosted: Thu Dec 23, 2010 10:30 am
by Apprentice
Happy to.
But before you start working on signals.
Can you tell me what type of signal you want.
(Describe the signal with a bit more detail.)
Like, I need Zero Lag / Price to Cross Signal
Signal when the Zero Lag trend changes...
In each case.

Re: Zero Lag indicator

PostPosted: Thu Dec 30, 2010 6:29 pm
by hhbraz
Hi,
I would like to get a trend change signal (up or down) at earliest candle close and at varying chart times (I'm mostly interested in 1 hr, 4 hr and daily). I plan to use this signal along with current price level, candle stick formation and an ocillator to facilitate early entry into a trend.
Thanks, hhb

Re: Zero Lag indicator

PostPosted: Fri Dec 31, 2010 9:39 am
by Apprentice
Added to developmental cue.

Re: Zero Lag indicator

PostPosted: Thu Jul 05, 2012 4:40 pm
by Alexander.Gettinger
MQL4 version of Zero Lag indicator: viewtopic.php?f=38&t=20871