indicator · on price · open source

Auto Support and Resistance indicator

Auto Support and Resistance is a free open-source indicator by @deepwick. Auto-detected S/R from confirmed swing highs and lows — the most recent confirmed pivot of… Deepwick Script runs a subset of Pine Script.

Deepwick · @deepwickv1Updated 3 Nov 2026▲ 0 users
Running…
Loading chart…

What Auto Support and Resistance does

Auto-detected S/R from confirmed swing highs and lows — the most recent confirmed pivot of each side becomes the active resistance (red) and support (green) line.

  • Strength controls how many bars each side has to be the high/low before it's a pivot.
  • Lines only update when a new pivot prints, so the chart stays clean.
  • Breaks of the active R are obvious trend signals; rejections off S are mean-reversion setups.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("Auto Support and Resistance", overlay=true)
swing = input.int(10, "Swing strength", minval=2, maxval=50)
colorDown = input.color("color.red", "Color  Down")
colorUp = input.color("color.green", "Color  Up")
ph = ta.pivothigh(high, swing, swing)
pl = ta.pivotlow(low, swing, swing)
lastPh = ta.valuewhen(not na(ph), ph, 0)
lastPl = ta.valuewhen(not na(pl), pl, 0)
p_R = plot(lastPh, "R", color=colorDown, style=plot.style_linebr, linewidth=2)
p_S = plot(lastPl, "S", color=colorUp, style=plot.style_linebr, linewidth=2)
alertcondition(ta.crossover(close, lastPh), "Resistance break", "Close crossed above the active resistance")
alertcondition(ta.crossunder(close, lastPl), "Support break", "Close crossed below the active support")

Comments

No comments yet.

Sign in to comment.