indicator · on price · open source

Swing High/Low Markers

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

About

Swing High / Low Markers — minimal labels on every confirmed pivot, no structure classification, no step line.

  • Cleanest possible swing visualisation — just H/L labels.
  • Use when your chart is already busy with other overlays and you only want the raw swings.
  • Same swing engine as the structure indicators above.

Source code

//@version=5
indicator("Swing High/Low Markers", overlay=true)
swing = input.int(5, "Swing Length", minval=2, maxval=50)
ph = ta.pivothigh(high, swing, swing)
pl = ta.pivotlow(low, swing, swing)
plotshape(not na(ph), "Swing High", style=shape.circle, location=location.abovebar, color=color.green)
plotshape(not na(pl), "Swing Low", style=shape.circle, location=location.belowbar, color=color.red)
alertcondition(not na(ph), "Swing High", "New swing high confirmed")
alertcondition(not na(pl), "Swing Low", "New swing low confirmed")

Comments

No comments yet.

Sign in to comment.