indicator · on price · open source

Swing High Low indicator

Swing High Low is a free open-source indicator. Confirmed swing pivots — each pivothigh/pivotlow is plotted as a step line that lasts until… Deepwick Script runs a subset of Pine Script.

v1Updated 3 Oct 2026▲ 0 users
Running…
Loading chart…

What Swing High Low does

Confirmed swing pivots — each pivothigh/pivotlow is plotted as a step line that lasts until the next one prints. Marks the actual swing points so you can see structure at a glance.

  • Lines update swing bars after the high/low forms (no repaint).
  • Use 3–5 for short-term structure, 10+ for swing levels.

Source code

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

//@version=6
indicator("Swing High Low", overlay=true)
swing = input.int(8, "Pivot left/right", minval=1, maxval=50)
colorDown = input.color("color.red", "Color  Down")
colorUp = input.color("color.green", "Color  Up")
sh = ta.pivothigh(high, swing, swing)
sl = ta.pivotlow(low, swing, swing)
shp = ta.valuewhen(not na(sh), sh, 0)
slp = ta.valuewhen(not na(sl), sl, 0)
p_SH = plot(shp, "SH", color=colorDown, style=plot.style_linebr, linewidth=2)
p_SL = plot(slp, "SL", color=colorUp, style=plot.style_linebr, linewidth=2)

Comments

No comments yet.

Sign in to comment.