indicator · on price · open source
Equal Lows (EQL)
Running…
Loading chart…
About
Equal Lows (EQL) — two consecutive confirmed swing lows within a percentage tolerance. Mirror of EQH.
- Line extends forward from the EQL confluence.
tolerancePctcontrols the matching tolerance.- A clean sweep of an EQL is a textbook SMC reversal trigger.
Source code
//@version=5
indicator("Equal Lows (EQL)", overlay=true)
swing = input.int(5, "Swing Length", minval=2, maxval=50)
tolerancePct = input.float(0.5, "Tolerance %", minval=0, maxval=2, step=0.1)
pl = ta.pivotlow(low, swing, swing)
var float lastPl = na
var float prevPl = na
if not na(pl)
prevPl := lastPl
lastPl := pl
tol = tolerancePct / 100
eql = not na(lastPl) and not na(prevPl) and math.abs(lastPl - prevPl) <= math.max(lastPl, prevPl) * tol
var float eqlLevel = na
if eql
eqlLevel := math.min(lastPl, prevPl)
p_EQL_Level = plot(eqlLevel, "EQL Level", color=color.aqua, style=plot.style_stepline, linewidth=2)
plotshape(eql and not eql[1], "EQL", style=shape.diamond, location=location.belowbar, color=color.aqua, text="EQL")
alertcondition(eql and not eql[1], "Equal lows", "Two swing lows within tolerance")
No comments yet.
Sign in to comment.