What Is Zero Lag EMA Envelope

The zero-lag exponential moving average (ZLEMA) is a variation of the EMA (see Exponential Moving Average) which adds a momentum term to reduce lag in the average to track current prices more closely.

The effect of the momentum term is to make recent prices ‘overweight’ and thus tracked closely, and with negative weights on past terms.

By applying an envelope to the moving average, traders can avoid some whipsaw trades, and traders can increase their profits.

Zero Lag EMA Envelope Indicator

The Zero Lag EMA Envelope is a Trend indicator, and the envelopes can also be used to identify overbought and oversold levels when the trend is relatively flat.

How To Calculate Zero Lag EMA Envelope

Formula:

Lag = (Period-1)/2         Ema Data = {Data+(Data-Data(Lag days ago)) 

ZLEMA = EMA(EmaData,Period) 

Upper Band=ZLEMA +2%

Lower Band=ZLEMA-2%

Why Use Zero Lag EMA Envelope

With a moving average as its base, Moving Average Envelopes are a natural trend following indicator. The envelopes will lag price action. The direction of the moving average dictates the direction of the channel. In general, a downtrend is present when the channel moves lower, while an uptrend exists when the channel moves higher. The trend is flat when the channel moves sideways.

How To Use Zero Lag EMA Envelope

Moving averages are usually calculated to identify the trend direction of a stock or determine its support and resistance levels. 

Defining a Bullish Scenario to generate a buy signal:

  • When the price crosses above the ZLEMA, it indicates that the current price is greater than the average of the defined period; hence the market is in an upward trend.
  • When the shorter period moving average crosses over the longer time moving average, it indicates the start of a new uptrend.

Defining a Bearish Scenario to generate a sell signal:

  • When the price crosses down the ZLEMA, it indicates that the current price is lower than the average of the defined period; hence the market is in a downward trend.
  • When the shorter period moving average crosses down the longer time moving average, it indicates the start of a new downtrend.

Building Zero Lag EMA Envelope Trading Strategy On Mudrex:

You can create strategies on Mudrex using simple ‘blocks’. You can connect multiple blocks and define conditions on those connections or ‘paths’ to create your strategy on Mudrex.

As discussed above, lets first write our entry/exit conditions so that we know what to do:

BUY: When price crosses up the ZLEMA.

SELL: When price crosses down the ZLEMA.

Overall Strategy: The overall strategy on mudrex looks like this

Testing: We can now run a quick back-test to see how our strategy performs

Other links:

A few quick references below: