indicator · on price · open source

Hammer indicator

Hammer is a free open-source indicator. Hammer: small body at the top of the candle with a long lower wick (≥ 60% of range) and a… Deepwick Script runs a subset of Pine Script.

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

What Hammer does

Hammer: small body at the top of the candle with a long lower wick (≥ 60% of range) and a tiny upper wick. Bullish reversal signal at the bottom of a downtrend.

  • Triangle marker below the bar + green bar colour.
  • Most reliable when it forms after a sharp decline and the next candle confirms upward.

Source code

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

//@version=6
indicator("Hammer", overlay=true)
bodyMax = input.float(0.3, "Body max % of range", minval=0.05, maxval=1, step=0.05)
lowerMin = input.float(0.6, "Lower wick min %", minval=0.3, maxval=1, step=0.05)
upperMax = input.float(0.2, "Upper wick max %", minval=0.05, maxval=1, step=0.05)
colorUp = input.color("color.green", "Color  Up")
hlRange = high - low
smallBody = hlRange > 0 and math.abs(close - open) < hlRange * bodyMax
longLower = math.min(close, open) - low > hlRange * lowerMin
tinyUpper = hlRange > 0 and high - math.max(close, open) < hlRange * upperMax
hammer = smallBody and longLower and tinyUpper
barcolor(hammer ? colorUp : na)
plotshape(hammer, "Hammer", style=shape.triangleup, location=location.belowbar, color=colorUp, text="H")
alertcondition(hammer, "Hammer", "Hammer candle printed")

Comments

No comments yet.

Sign in to comment.