indicator · on price · open source

Support Resistance Zones

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

S/R zones — the band between the latest confirmed swing high and swing low, shaded as a single confluence zone.

  • Single purple band = the area price is mean-reverting inside.
  • A close outside the band breaks structure and the band resets on the next pivot.

Source code

//@version=5
indicator("Support Resistance Zones", overlay=true)
swing = input.int(12, "Swing strength", minval=2, maxval=50)
ph = ta.pivothigh(high, swing, swing)
pl = ta.pivotlow(low, swing, swing)
top = ta.valuewhen(not na(ph), ph, 0)
bot = ta.valuewhen(not na(pl), pl, 0)
p_ZoneTop = plot(top, "ZoneTop", color=color.purple, style=plot.style_linebr)
p_ZoneBottom = plot(bot, "ZoneBottom", color=color.purple, style=plot.style_linebr)
fill(p_ZoneTop, p_ZoneBottom, color=color.new(color.purple, 92))

Comments

No comments yet.

Sign in to comment.