OPEN-SOURCE SCRIPT

ZL Trend Indicator

312
█ 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.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.