OPEN-SOURCE SCRIPT
ZL Trend Indicator

█ OVERVIEW
ZL Trend Indicator (ZLT) is an original indicator inspired by the concept of Zero Lag moving averages and order block retest entries.
The core idea: when the Zero Lag MA crosses the base EMA, an ATR-based support/resistance zone is drawn. A triangle signal fires when price retests that zone and bounces back — confirming the move rather than chasing the initial cross.
This script is a fully independent implementation built from scratch.
█ HOW IT WORKS
• Zero Lag MA (ZLMA): Reduces EMA lag by adding the difference between close and EMA to the source, then applying a second EMA. Result is a smoother, faster-responding MA.
• Base EMA: Standard EMA used as the trend reference.
• Trend Zone: When ZLMA crosses EMA, an ATR-based zone (two horizontal lines) is fixed at the cross level. Upper/lower boundaries update only on new crosses.
• Retest Signal: Once price enters the zone, ZLT watches for a bounce. The triangle fires on the first bar where price closes back outside the zone — confirming rejection.
█ SIGNALS
◆ Diamond — ZLMA crosses EMA (trend shift)
▲ Triangle Up — Bullish retest confirmed: price touched zone, bounced above it
▼ Triangle Down — Bearish retest confirmed: price touched zone, dropped below it
█ SETTINGS
Zero Lag MA
• ZLMA Length (default 15) — period for both EMAs in the ZLMA calculation
Trend Zone
• Zone ATR Period (default 200) — ATR period used to set zone width at each cross
Colors
• + / − — customize bullish and bearish colors
█ ALERTS
• Triangle Signal ▲▼ — BUY and SELL combined (saves alert slots)
• Diamond Signal ◆ — ZLMA cross only
• BUY Signal ▲ — bullish retest bounce only
• SELL Signal ▼ — bearish retest bounce only
Set alerts to "Once Per Bar Close" for best accuracy.
█ NOTES
• Works best combined with a trend filter such as a 200 EMA — for example, only taking BUY triangles when price is above the 200 EMA.
• Higher timeframes tend to produce cleaner signals with less noise.
• Past performance does not guarantee future results.
ZL Trend Indicator (ZLT) is an original indicator inspired by the concept of Zero Lag moving averages and order block retest entries.
The core idea: when the Zero Lag MA crosses the base EMA, an ATR-based support/resistance zone is drawn. A triangle signal fires when price retests that zone and bounces back — confirming the move rather than chasing the initial cross.
This script is a fully independent implementation built from scratch.
█ HOW IT WORKS
• Zero Lag MA (ZLMA): Reduces EMA lag by adding the difference between close and EMA to the source, then applying a second EMA. Result is a smoother, faster-responding MA.
• Base EMA: Standard EMA used as the trend reference.
• Trend Zone: When ZLMA crosses EMA, an ATR-based zone (two horizontal lines) is fixed at the cross level. Upper/lower boundaries update only on new crosses.
• Retest Signal: Once price enters the zone, ZLT watches for a bounce. The triangle fires on the first bar where price closes back outside the zone — confirming rejection.
█ SIGNALS
◆ Diamond — ZLMA crosses EMA (trend shift)
▲ Triangle Up — Bullish retest confirmed: price touched zone, bounced above it
▼ Triangle Down — Bearish retest confirmed: price touched zone, dropped below it
█ SETTINGS
Zero Lag MA
• ZLMA Length (default 15) — period for both EMAs in the ZLMA calculation
Trend Zone
• Zone ATR Period (default 200) — ATR period used to set zone width at each cross
Colors
• + / − — customize bullish and bearish colors
█ ALERTS
• Triangle Signal ▲▼ — BUY and SELL combined (saves alert slots)
• Diamond Signal ◆ — ZLMA cross only
• BUY Signal ▲ — bullish retest bounce only
• SELL Signal ▼ — bearish retest bounce only
Set alerts to "Once Per Bar Close" for best accuracy.
█ NOTES
• Works best combined with a trend filter such as a 200 EMA — for example, only taking BUY triangles when price is above the 200 EMA.
• Higher timeframes tend to produce cleaner signals with less noise.
• Past performance does not guarantee future results.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.