0% found this document useful (0 votes)
9 views1 page

ZLT

The document is a Pine Script code for a trading indicator called 'Zero-Lag Trend Signals' (ZLT V1). It calculates a zero-lag exponential moving average and generates bullish and bearish signals based on price crossovers with a volatility band. Additionally, it includes alert conditions for buy and sell signals.

Uploaded by

Aj Deshmukh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

ZLT

The document is a Pine Script code for a trading indicator called 'Zero-Lag Trend Signals' (ZLT V1). It calculates a zero-lag exponential moving average and generates bullish and bearish signals based on price crossovers with a volatility band. Additionally, it includes alert conditions for buy and sell signals.

Uploaded by

Aj Deshmukh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//@version=5

indicator('Zero-Lag Trend Signals', 'ZLT V1', overlay=true)

// ───────────── Inputs ─────────────


lenZLT = input.int(70, 'ZLT Length')
multZLT = input.float(3, 'Band Multiplier')
colBull = input.color(#002aff, 'Bull Arrow Color')
colBear = input.color(#002aff, 'Bear Arrow Color')

// ───────────── Core ─────────────


lag = math.floor((lenZLT - 1) / 2)
zlema = ta.ema(close + (close - close[lag]), lenZLT)
volBand = ta.highest(ta.atr(lenZLT), lenZLT*3) * multZLT

var int trend = 0


if ta.crossover(close, zlema + volBand)
trend := 1
if ta.crossunder(close, zlema - volBand)
trend := -1

isBull = ta.crossover(trend, 0)
isBear = ta.crossunder(trend, 0)

offsetArrows = 0
arrowYPosBull = low * 0.999
arrowYPosBear = high * 1.001

// ───────────── Plotshapes (однострочно) ─────────────


plotshape(isBull ? arrowYPosBull : na, 'Bullish ZLT', shape.labelup,
location.belowbar, colBull, text='▲', textcolor=color.white, size=size.tiny,
offset=offsetArrows)
plotshape(isBear ? arrowYPosBear : na, 'Bearish ZLT', shape.labeldown,
location.abovebar, colBear, text='▼', textcolor=color.white, size=size.tiny,
offset=offsetArrows)

// ───────────── Alerts ─────────────


alertcondition(isBull, 'ZLT BUY', 'Zero-Lag Trend BUY')
alertcondition(isBear, 'ZLT SELL', 'Zero-Lag Trend SELL')

You might also like