บทความ

Zero Lag Exponential Moving Average (ZLEMA): Formula, Calculation and How to Use It

The Zero Lag Exponential Moving Average (ZLEMA) is a type of exponential moving average, or (EMA), that runs on an adjusted price, so the ZLEMA reacts to price changes sooner than a standard EMA. The ZLEMA targets lag, the delay built into all moving averages because they are calculated from past prices. This guide covers the ZLEMA formula, a worked example on real EUR/USD prices, how traders use the line, which settings suit each trading style and where the ZLEMA falls short.

Key Takeaways

  • The ZLEMA is an EMA run on adjusted prices. The ZLEMA adds the recent price change to the current price before smoothing, so the line turns sooner than a standard EMA.
  • The ZLEMA still lags, just less than an EMA because ZLEMA is built from past prices, so it can only react after price moves. It reacts sooner than an EMA of the same period, but some delay always remains.
  • The formula takes three steps by finding the lag with (Period − 1) ÷ 2, build the adjusted price, then apply the normal EMA formula to it.
  • Faster signals come with more false signals which the ZLEMA whipsaws more than an EMA in sideways markets, so traders often confirm its signals with volume, RSI or MACD.
  • Common setting starting points are 9, 20 or 21, 50 and 200 periods, depending on your trading style.
  • MT4 and MT5 don't include the ZLEMA but traders can add the ZLEMA as a custom indicator made by a third party.

What Is the Zero Lag Exponential Moving Average (ZLEMA)?

The Zero Lag Exponential Moving Average (ZLEMA) is an exponential moving average calculated on adjusted prices, which makes the ZLEMA react to price changes sooner than a standard EMA. The ZLEMA keeps the EMA's smoothing formula and changes only the price that goes into it. John Ehlers and Ric Way created the ZLEMA around 2010.

The ZLEMA belongs to the same family as the Double Exponential Moving Average, or (DEMA), and the Triple Exponential Moving Average, or (TEMA). All three aim to reduce the lag of a standard EMA, but each one uses a different method. Traders use the ZLEMA to read trend direction and to spot crossovers, the points where price or a second ZLEMA line crosses the first. Because the ZLEMA turns sooner than an EMA, those signals appear earlier. The name suggests the ZLEMA has no delay at all, which is not quite true.

Does the ZLEMA Really Have Zero Lag?

No, the ZLEMA reduces lag but does not remove it. The ZLEMA is still built from past closing prices, and the EMA smoothing step still averages those prices over the chosen period, so a delay remains. That delay is shorter than an EMA's delay with the same period, but it is not zero. The "zero lag" part is just what the indicator is called. It does not mean the ZLEMA moves at the same time as price. When price starts a new move, the ZLEMA only turns after the move has begun. It turns earlier than an EMA would, but never before price does.

How Does the ZLEMA Reduce Lag?

The ZLEMA reduces lag by adding the recent price change to the current price before applying the EMA, so the average starts from a value closer to where price is now. The averaging step stays the same as a normal EMA. Only the price that goes into it changes. To see why that works, it helps to look first at where lag comes from.

What Is Lag in a Moving Average?

Lag in a moving average is the delay between a price move and the moving average reflecting that move. Lag happens because every moving average includes past prices, which hold the line back while price moves on. How much a moving average lags depends on how much weight it gives to older prices.

  • A simple moving average, or (SMA) weights every price equally, so the SMA lags the most.
  • An EMA weights recent prices more, so the EMA lags less.
  • The ZLEMA adjusts the price before smoothing, so the ZLEMA lags even less than the EMA.

Because of lag, a moving average signal only shows up once price has already started moving, so traders get in and out later than the actual turn.

How De-Lagged Price Data Works

The ZLEMA's adjusted price is the current price plus the price change over the lag period, and the ZLEMA feeds this adjusted price into the EMA instead of the raw close. As a purely illustrative example, if price is 110 today and was 100 at the start of the lag period, the ZLEMA feeds 120 into the EMA instead of 110.

In a trend, the adjusted price sits ahead of the current price and pulls the EMA toward it, so the ZLEMA lands closer to price than a standard EMA would. In a sideways market, the same adjustment can overshoot. A small move gets doubled, so when price turns back, the ZLEMA flips direction too. That overshoot is where the ZLEMA's whipsaws come from. The formula below puts this idea into three steps.

Diagram of the ZLEMA de-lagged price formula: price now plus the price change over 10 bars equals the adjusted price fed into the EMAZLEMA Formula and Calculation

The ZLEMA formula has three steps. Find the lag with (Period − 1) ÷ 2, build the adjusted price with Price + (Price − Price from Lag bars ago), then apply the EMA formula to that adjusted price.

ComponentFormulaWhat It Does
LagLag = (Period − 1) ÷ 2Sets how many bars back the comparison price is taken from
Adjusted price

Price + (Price − Price from Lag bars ago)

= 2 × Price − Price from Lag bars ago

Adds the change over the lag period to the current price
Multiplier (k)k = 2 ÷ (Period + 1)Same weighting multiplier as a standard EMA
ZLEMAZLEMA = (Adjusted price × k) + (Previous ZLEMA × (1 − k))Applies the EMA formula to the adjusted price

Step 1: Find the Lag Period

The ZLEMA lag period equals the period minus one, divided by two, and it sets how many bars back the comparison price comes from.

Lag = (Period − 1) ÷ 2

For a 21 period ZLEMA, the lag is (21 − 1) ÷ 2 = 10 bars. A 20 period gives 9.5, and platforms round that differently, some down to 9 and some up to 10. So the same setting can show slightly different values on different charts.

PeriodLag = (Period − 1) ÷ 2Whole Number Needed?Multiplier k = 2 ÷ (Period + 1)
94No0.2000
209.5Yes. Platforms round to 9 or 100.0952
2110No0.0909
5024.5Yes. Platforms round to 24 or 250.0392
20099.5Yes. Platforms round to 99 or 1000.0100

Step 2: Calculate the De-Lagged Price

The ZLEMA's adjusted price equals the current price plus the change in price over the lag period.

Adjusted price = Price + (Price − Price from Lag bars ago)

The short form below gives the same result.

Adjusted price = 2 × Price − Price from Lag bars ago

For a 21 period ZLEMA, that means today's close plus the move since 10 bars ago.

Step 3: Apply the EMA to the De-Lagged Price

The ZLEMA applies the standard EMA formula to the adjusted price instead of the closing price, starting with the multiplier.

k = 2 ÷ (Period + 1)

The multiplier then goes into the ZLEMA formula.

ZLEMA = (Adjusted price × k) + (Previous ZLEMA × (1 − k))

This is the normal EMA formula with the adjusted price in place of the close. The very first ZLEMA value needs a starting point, and platforms handle that start differently.

ZLEMA Calculation Example

This example calculates a 21 period ZLEMA on five real EUR/USD daily closes from 11 to 17 September 2026, alongside a 21 period EMA on the same bars. EUR/USD is an illustration only, not a trade idea. The lag is 10 bars and k = 2 ÷ 22 = 0.0909. Both lines start at the 10 September close of 1.1612 to keep the maths simple, so values differ slightly from a live chart, which uses a longer price history.

On Bar 1 (11 September), EUR/USD closed at 1.1600, and the close 10 bars earlier (28 August) was 1.1585.

Adjusted price = 2 × 1.1600 − 1.1585 = 1.1615

ZLEMA = 1.1615 × 0.0909 + 1.1612 × 0.9091 = 1.16123

The table carries the same steps through Bar 5.

Date (Bar)CloseClose 10 Bars Ago (Date)Adjusted Price (2 × Close − Close 10 Bars Ago)ZLEMA (21)EMA (21)Gap to Close (ZLEMA / EMA)
10 Sep 2026 (start)1.1612n/an/a1.161201.16120n/a
11 Sep 2026 (Bar 1)1.16001.1585 (28 Aug)1.16151.161231.1610912 pips / 11 pips
14 Sep 2026 (Bar 2)1.15491.1618 (31 Aug)1.14801.160021.1605351 pips / 56 pips
15 Sep 2026 (Bar 3)1.15441.1593 (1 Sep)1.14951.159071.1599747 pips / 56 pips
16 Sep 2026 (Bar 4)1.14661.1589 (2 Sep)1.13431.156821.15876102 pips / 122 pips
17 Sep 2026 (Bar 5)1.14761.1626 (3 Sep)1.13261.154611.1577470 pips / 101 pips

EUR/USD daily closing prices from Investing.com historical data, pulled 18 September 2026. 1 pip = 0.0001.

As EUR/USD fell from 1.1600 to 1.1476, the ZLEMA fell faster than the EMA. By 17 September, the ZLEMA sat about 70 pips above the close while the EMA sat about 101 pips above it. In short, the ZLEMA stayed closer to price but was still behind it. Next, here is how traders read the ZLEMA on a chart.

How to Use the ZLEMA in Trading

Traders use the ZLEMA to read trend direction, spot crossovers and mark dynamic support or resistance, usually with a second indicator to confirm the signal. The ZLEMA works the same ways as other moving averages, but its signals show up sooner and change direction more often.

Reading Trend Direction With the ZLEMA

The ZLEMA shows trend direction through its slope and where price sits relative to the line.

  • A rising ZLEMA with price above it points to an uptrend.
  • A falling ZLEMA with price below it points to a downtrend.
  • A flat ZLEMA with price tangled around it points to no clear trend.

These readings show what the trend has done so far, not where price will go next.

Price and ZLEMA Crossovers

A close above the ZLEMA can mark a shift toward bullish momentum, and a close below the ZLEMA can mark a shift toward bearish momentum. Many traders wait for the close to hold beyond the line before acting, because price often crosses the line and then moves straight back. In a range, price crosses the ZLEMA back and forth, so many of these crossovers lead nowhere.

Dual ZLEMA Crossovers

A dual ZLEMA crossover uses a fast ZLEMA and a slow ZLEMA, such as 9 and 21 or 21 and 50. The fast line crossing above the slow line can mark rising momentum, and crossing below can mark fading momentum. The logic matches a standard moving average crossover. Because both ZLEMA lines react quickly, their crossovers come earlier than EMA crossovers and also flip more often.

Chart of a fast 9-period and slow 21-period ZLEMA crossover, showing a bullish crossover in a trend and false crossovers in a sideways marketUsing the ZLEMA as Dynamic Support and Resistance

The ZLEMA can act as dynamic support in an uptrend and dynamic resistance in a downtrend. When pullbacks touch the ZLEMA and turn back, the trend is holding. A clean break through the line can be an early sign the trend is weakening. Some traders place a stop loss just beyond the ZLEMA. A stop limits your risk, but it does not remove it.

Confirming ZLEMA Signals With Other Indicators

Because the ZLEMA is fast, a second indicator helps filter its false signals.

  • Volume: Rising volume behind a crossover shows wider participation in the move.
  • RSI: An RSI moving the same way as the signal adds weight.
  • MACD: MACD momentum in line with the move supports it.
  • Key levels: Crossovers near known support or resistance carry more weight.

How well each of these works depends on the ZLEMA period you choose, which the next section covers.

Best ZLEMA Settings for Different Trading Styles

There is no single best ZLEMA setting, because the right period depends on your trading style and chart timeframe. Short term traders often start with 9 periods, 20 or 21 is a common baseline, and 50 or 200 suit slower trend filtering.

Trading StyleTypical Chart TimeframeZLEMA PeriodTrade Off
Scalping and fast intraday1 to 15 minute9Fastest reaction and most false signals
Day trading and swing baseline15 minute to 4 hour20 or 21Balance of speed and smoothness
Swing and position trading4 hour to daily50Smoother but slower to turn
Long term trend filterDaily to weekly200Shows the broad trend but is very slow to react
Dual crossover pairsAny9 and 21, 21 and 50, or 50 and 200Faster pairs signal sooner and flip more often

Comparison of ZLEMA settings at 9, 21, 50 and 200 periods, showing the trade-off between faster response and a smoother, more stable lineThe trade off is speed against noise. Shorter periods react faster and whipsaw more, while longer periods are smoother and slower to turn. A 50 and 200 period pairing uses the same lengths as the golden cross and death cross signals. Default lengths also differ between platforms, so check the period your ZLEMA uses before comparing it with another chart. These periods are only common starting points, so test them on your own charts before using them.

ZLEMA vs EMA, DEMA and TEMA

The EMA, DEMA, TEMA and ZLEMA all have smooth prices with exponential weighting, but each one handles lag differently. The ZLEMA changes the price that goes into one EMA, while the DEMA and TEMA combine two or three EMAs.

ZLEMA vs EMA

The ZLEMA uses the same smoothing formula as the EMA but feeds it adjusted prices, so the ZLEMA reacts sooner and gives more false signals in sideways markets.

FeatureEMAZLEMA
Input to the formulaRaw closing priceAdjusted price (2 × Price − Price from Lag bars ago)
Smoothing formulak = 2 ÷ (Period + 1)Same multiplier, same formula
LagNoticeable delay behind priceLess delay than an EMA of the same period, but not zero
Reaction to trend changesSlowerSooner
Sideways or choppy marketsSmoother, fewer whipsawsMore prone to whipsaws and false crossovers
Typical useSteady trend tracking and dynamic support or resistanceEarlier trend and crossover signals when timing matters more than smoothness
Built into MT4 and MT5Yes (Moving Average, Exponential method)No (custom indicator)

Chart comparing a 21-period ZLEMA against a 21-period EMA, showing the ZLEMA turning first in a trend and giving more crossovers in a sideways marketThe EMA suits steadier trend tracking, where a smooth line matters more than speed. The ZLEMA suits setups where earlier signals matter more than smoothness. Neither one is better in every market. The EMA and SMA have the same kind of trade off, where the faster line gives up some smoothness.

ZLEMA vs DEMA and TEMA

The ZLEMA, DEMA and TEMA all aim to cut the lag of a standard EMA, but each uses a different method. The ZLEMA adjusts the price input and applies one EMA. The DEMA combines an EMA with an EMA of that EMA, and the TEMA combines three layers of EMAs.

FeatureZLEMADEMATEMA
How it reduces lagAdjusts the price input, then applies one EMA2 × EMA − EMA of the EMA3 × EMA − 3 × EMA of the EMA + EMA of the EMA of the EMA
EMA layers usedOneTwoThree
Built into MT5NoYesYes
Built into MT4NoNoNo

Diagram comparing how ZLEMA, DEMA and TEMA reduce lag using one, two and three EMA layers on price line chartsIn practice, MT5 includes the DEMA and TEMA as built in indicators but not the ZLEMA, and MT4 includes none of the three. Sources disagree on which of the three has the least lag or the fewest false signals, so this guide does not rank them. With the differences clear, the next section looks at where the ZLEMA helps and where it falls short.

Advantages and Limitations of the ZLEMA

The ZLEMA's speed is both its main strength and its main weakness. Reduced lag gives earlier signals, and the same reduced lag gives more false signals in sideways markets.

Advantages of the ZLEMA

The main advantage of the ZLEMA is earlier signals, because reduced lag lets the line turn sooner than an EMA of the same period.

  • Reacts much sooner to trend changes by turning earlier than a standard EMA of the same period.
  • Tracks price much more closely by staying nearer to the price action while still smoothing out market noise.
  • Works on any market and timeframe, making it highly versatile for forex, indices, commodities, and shares.
  • Seamlessly fits into existing setups by easily replacing the standard EMA in a trader’s current crossover or trend strategies.

Limitations of the ZLEMA

The main limitation of the ZLEMA is more false signals in sideways markets.

  • Produces more whipsaws in choppy markets by flipping back and forth when the price moves sideways.
  • Still suffers from lag because it only turns after a new price move has begun, even though it turns earlier than a standard EMA.
  • Can overshoot on sharp reversals by swinging too far for a few bars before it finally settles into the new direction.
  • Needs additional confirmation, meaning its signals carry far more weight when tools like volume, RSI, or MACD agree.
  • Values can differ between platforms because variations in lag rounding and starting values change the numbers from one chart to another.
  • It is not built into MT4 or MT5, meaning it must be added manually as a custom indicator.

To test the ZLEMA against these limits yourself, you first need it on a chart.

How to Add the ZLEMA to Your Trading Chart

MT4 and MT5 do not include the ZLEMA as a built in indicator, so the ZLEMA is added as a custom indicator through File > Open Data Folder. The standard Moving Average indicator offers only four methods, Simple (SMA), Exponential (EMA), Smoothed (SMMA) and Linear Weighted (LWMA).

  1. Get a ZLEMA custom indicator file (.mq4 for MT4, .mq5 for MT5), for example from the MQL5 Code Base or the Market inside the platform.
  2. In the platform, open File > Open Data Folder.
  3. Open MQL4 > Indicators for MT4 or MQL5 > Indicators for MT5, and paste the file there.
  4. Restart the platform or refresh the Navigator panel.
  5. Drag the indicator from Navigator onto your chart and set the period.

Screenshot showing how to add a custom ZLEMA indicator file to the MT4 and MT5 Indicators folderCustom indicator files are made by third parties, not TMGM. Only use files from sources you trust.

PlatformZLEMA Built In?How to Add It
MetaTrader 4NoPlace a .mq4 ZLEMA file in File > Open Data Folder > MQL4 > Indicators, then restart or refresh Navigator
MetaTrader 5NoPlace a .mq5 ZLEMA file in File > Open Data Folder > MQL5 > Indicators, then restart or refresh Navigator

Frequently Asked Questions About the ZLEMA

What Are Zero Lag Indicators?

Zero lag indicators are tools that apply a correction to reduce the delay of standard moving averages or oscillators. The ZLEMA and the Zero Lag MACD are two examples. Zero lag indicators react sooner than their standard versions, but they filter out less market noise.

What Is the Zero Lag MACD?

The Zero Lag MACD is a version of the MACD built on lag reduced averages instead of standard EMAs, usually with the same 12, 26 and 9 settings. Zero Lag MACD crossovers come earlier than standard MACD crossovers, and false signals are more frequent.

Is the ZLEMA a Leading or Lagging Indicator?

The ZLEMA is a lagging indicator that uses past prices, so it only turns after price has started a new move. The ZLEMA lags less than an EMA of the same period, but it does not predict future prices. Its signals tell you a move has started, not where price will go next.

How Do You Calculate the ZLEMA in Excel?

You calculate the ZLEMA in Excel with three columns. Column one holds closing prices. Column two, starting from the first row with a price Lag rows above it, calculates 2 × current price − price Lag rows above. Column three applies the EMA formula using k = 2 ÷ (Period + 1).

เทรดอย่างชาญฉลาดวันนี้

เงินทดลอง $10,000
มากกว่า 100 ตลาด
ค่าธรรมเนียมต่ำ สเปรดแคบ
Trading App
A group of expert analyst with strengths in fundamental and technical analysis, and years of experience in the Global Equity Markets, Forex, Precious Metals, Oils and other commodities, as well as Crypto, and so on.
เข้าร่วมกับลูกค้ามากกว่า 1,000,000 คนบนแพลตฟอร์มเทรดที่ได้รับรางวัลของเรา
1
สมัครบัญชีจริง
2
ฝากเงิน
เข้าบัญชี
3
เริ่มเทรด
ได้ทันที
เปิดบัญชี