Downloading...

Hammer candlestick

203
//version=5
indicator("Hammer Alert", overlay=true)

// Hammer Candlestick Definition (basic)
isHammer = close > open and
((high - low) > 3 * (close - open)) and
((close - low) / (0.001 + high - low) > 0.6) and
((open - low) / (0.001 + high - low) > 0.6)

// Plot Hammer Pattern on Chart
plotshape(isHammer, style=shape.labelup, location=location.belowbar, color=color.green, size=size.small, text="Hammer")

// Alert Condition
alertcondition(isHammer, title="Hammer Detected", message="Hammer candlestick pattern detected!")

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.