ClosedBar.Hammer

Calculates the Hammer candle pattern.

Returns: Series<Boolean>

ClosedBar.Hammer is a built-in function - you can use it directly. Below is an example implementation:

1234567
function ClosedBar.Hammer(): (
Downtrend() and
ClosedBar.IsShort() and
ClosedBar.UpperShadow() == 0 and
ClosedBar.LowerShadow() >= 2.5 * ClosedBar.Body() and
not ClosedBar.IsDoji()
)