Zero Lag is a modified EMA.
EMA ZL = α * (EMA + Gain * (Close - ZL )) + (1 - α) * ZL 
The formula is similar to EMA with an addition of a new value Gain * (Close - ZL )
Gain is the value selected from the interval [-GainLimit, GainLimit] to minimize the error for the current data sample (Close - ZL) → min
The indicator has three input parameters:
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/19896